Skip to content

release: add API documentation review agents to the process - #42

Merged
jnasbyupgrade merged 7 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:worktree-release-doc-review-agents
Jul 27, 2026
Merged

release: add API documentation review agents to the process#42
jnasbyupgrade merged 7 commits into
Postgres-Extensions:masterfrom
jnasbyupgrade:worktree-release-doc-review-agents

Conversation

@jnasbyupgrade

@jnasbyupgrade jnasbyupgrade commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Step 2: Launch API Documentation Review Agents to the /release skill, run right after pre-flight passes and in the background.
    • A. Since-last-release review — scoped to commits between the release tag and HEAD in ../pgxntool; flags behavior changes not called out in HISTORY.asc's STABLE section, and API items added/removed by those commits but not reflected in README.asc. Commit subject lines are explicitly called out as an unreliable filter — the file-level diff must always be checked.
    • B. Comprehensive review — ignores git history; compares the full user-facing API surface against what's actually documented in README.asc.
  • Adds Step 5: Inspect API Documentation Review Findings as a hard gate: no release-related git change (editing/committing HISTORY.asc in Step 6 onward) happens until both sets of findings are retrieved and inspected. Since-last-release findings must be fixed before continuing; comprehensive findings go to the user for a fix-now/follow-up/dismiss decision; ambiguous scope calls also go to the user, with a nudge to fold the answer back into the definition.
  • Moves the "user-facing API surface" definition out of SKILL.md and into this repo's own CLAUDE.md (../pgxntool/CLAUDE.md is user-facing docs for extension developers, not dev/audit tooling), so the definition can evolve independently of the process instructions that consume it. Target discovery uses pgxntool's own make list target rather than grepping for target definitions, since pattern rules and generated targets are easy to miss that way.
  • Renumbers the remaining steps to fit the two new ones in (old 3–8 → new 3–4, 6–10).

Validated with a real dry run

Ran both review efforts for real (Step 2B against pgxntool's current state, Step 2A as a stand-in against the 2.0.3..2.1.0 range, since there are currently no unreleased commits). That surfaced real process rough edges, now folded into the instructions:

  • make list's output includes harmless submake chatter (Makefile, make[1]) and misses targets gated behind ifeq/ifdef conditionals in a bare scratch directory.
  • A blanket "every PGXNTOOL_-prefixed variable" rule was too broad — internal plumbing vars share the prefix with real user-facing toggles; narrowed to variables designed for override.
  • Generated-file targets (META.json, meta.mk, control.mk) are build plumbing; dev-helper targets (list, print-%) are genuinely user-facing.
  • DEBUG's existence can be documented, but its specific level numbers are an internal implementation detail, not a stable contract.
  • Doc-only changes to files that ship to consumers don't need a HISTORY.asc entry.

It also surfaced two real, currently-undocumented gaps in pgxntool itself (not fixed by this PR — flagged separately): pgxntool-sync silently deletes pgxntool/.github/pgxntool/.claude from consumer projects with no HISTORY.asc/README.asc mention, and pgtle.sh's DEBUG level numbers were renumbered in a way that silently breaks old DEBUG=1-4 usage.

Test plan

  • Read through the full updated SKILL.md and CLAUDE.md end-to-end to confirm step numbers and cross-references are consistent.
  • Ran both Step 2 review efforts for real against pgxntool as a dry run; used their findings to fix rough edges in the instructions.
  • Exercise /release on a real release to confirm the review agents produce useful, actionable findings in practice going forward.

🤖 Generated with Claude Code

Adds a new early step that launches two independent review efforts via
the Agent tool: a since-last-release review comparing commits against
release..HEAD to catch behavior changes missing from HISTORY.asc's
STABLE section, and a comprehensive review comparing README.asc's
documented make targets/variables against the current code regardless
of history. Both are launched in the background right after pre-flight
so they have time to finish, and a new gate step requires their
findings to be inspected before any release-related git change is made
(the HISTORY.asc edit and commit).
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f695baee-c762-4c1d-ad59-18fd66d705b0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…definition

The prior version pinned the review agents' scope to a fixed list of
pgxntool files, which is both too specific (goes stale as files are
added/removed) and doesn't reflect the real criterion. Add a
'User-facing API surface' entry to Terminology instead: all make
targets and documented-worthy prerequisites (e.g. testdeps), all
PGXNTOOL_-prefixed variables, and the scripts users are expected to
invoke by hand (setup.sh, pgxntool-sync.sh, update-setup-files.sh,
pgtle.sh). Everything else defaults to internal. Both review agents
and the Step 5 gate now reference this definition and are told to
flag ambiguous cases for the user rather than silently deciding, since
the definition is expected to evolve.
Grepping for target definitions across .mk/.mk.sh files is liable to
miss pattern rules and generated targets. pgxntool already ships a
'list' target in base.mk that parses make's own database via 'make -p',
which is the authoritative source. Point the target-discovery step at
that instead, run from a scratch directory that just includes base.mk,
and cross-reference its output against pgxntool's own makefiles to
exclude targets it merely inherits from PGXS.
@jnasbyupgrade
jnasbyupgrade marked this pull request as ready for review July 27, 2026 22:14
Ran the Step 2A/2B review agents for real (against the current pgxntool
state and, as a stand-in since there were no unreleased commits, the
2.0.3..2.1.0 range) to shake out problems with the process before
relying on it. They surfaced real gaps (an undocumented file-pruning
behavior added to pgxntool-sync, a silently renumbered DEBUG scheme)
and several rough edges in the instructions themselves:

- make list output includes harmless submake chatter (Makefile,
  make[1]) that isn't real targets, and misses targets gated behind
  ifeq/ifdef conditionals in a bare scratch directory.
- Commit subject lines are not a reliable filter for whether a commit
  touches the API surface; the file-level diff must always be checked.
- Every PGXNTOOL_-prefixed variable was too broad a rule (internal
  plumbing vars share the prefix with real user-facing toggles).
- Generated-file targets (META.json, meta.mk, control.mk) are build
  plumbing, not something a user intentionally runs, while dev-helper
  targets (list, print-%) are genuinely user-facing.
- DEBUG's existence can be documented, but its specific level numbers
  are an internal implementation detail, not a stable contract.
- Doc-only changes to files that ship to consumers don't need a
  HISTORY.asc entry.

Moves the full 'user-facing API surface' definition out of SKILL.md's
Terminology section and into this repo's own CLAUDE.md (not
../pgxntool/CLAUDE.md, which is user-facing docs for extension
developers, not dev/audit tooling docs), so it can evolve independently
of the release process instructions that consume it. SKILL.md now
points to that section and keeps only the make-list discovery mechanics
and the review-effort descriptions.
- pgxntool/CLAUDE.md is AI-agent instructions for people working in
  consumer repos, not internal pgxntool-developer documentation --
  it ships with every subtree pull the same way README.asc does, so
  substantive changes to it are in scope (previously exempted as
  'doc-only', which was wrong).
- Conditionally-gated helper targets that only exist to support another
  target's lifecycle (clean-test-build, the install-schedule file
  target) are internal, not meant to be invoked by hand -- unlike the
  primary target they support (test-build), which stays in scope on
  its own merits.

Also makes explicit that finding conditionally-defined targets requires
reading the source directly; make list alone won't surface them from a
bare scratch directory.
No existing instruction (here or in the release skill's own, narrower
pre-flight check) required confirming local master matches upstream
before branching off it. Found the gap the hard way this session:
local pgxntool master was 8 commits behind upstream/master, and one of
the missed commits had already fixed one of the exact issues the API
documentation review was about to redo.
jnasbyupgrade added a commit to jnasbyupgrade/pgxntool that referenced this pull request Jul 27, 2026
git subtree pull copies pgxntool's entire tree into the consumer
project, including dev-only directories that don't belong there.
prune_pgxntool_dev_dirs() (lib.sh) has silently removed these after
every sync since Postgres-Extensions#41, but the behavior was never documented anywhere
-- surfaced by the pgxntool-test API documentation review
(Postgres-Extensions/pgxntool-test#42).
@jnasbyupgrade
jnasbyupgrade merged commit f4dda53 into Postgres-Extensions:master Jul 27, 2026
4 checks passed
@jnasbyupgrade
jnasbyupgrade deleted the worktree-release-doc-review-agents branch July 27, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant