Skip to content

chore: make claude-code-review workflow prompt generic#301

Merged
admin-sbneto merged 2 commits into
developfrom
chore/claude-code-review-generic-prompt
May 25, 2026
Merged

chore: make claude-code-review workflow prompt generic#301
admin-sbneto merged 2 commits into
developfrom
chore/claude-code-review-generic-prompt

Conversation

@sbneto
Copy link
Copy Markdown
Contributor

@sbneto sbneto commented May 25, 2026

TL;DR

The claude-code-review workflow prompt currently has project-specific architecture rules baked into the YAML. Push them out into AGENTS.md / CLAUDE.md / specs/*.md — the documents that already describe the project — and shrink the workflow to a generic review posture that points at those docs.

Why

The anthropics/claude-code-action@v1 validates the workflow YAML byte-for-byte against the default branch before exchanging the OIDC token. Any project specifics inside the workflow turn into a gate against ordinary work:

  • A code change that touches a convention also requires updating the workflow's description of that convention.
  • That workflow update can't ride along on the same PR — the byte-match guard fails.
  • Result: PRs get blocked from the bot review until a separate micro-PR lands the workflow update first.

This bit polyswarm-api PR #298 twice. Once a stale PolyswarmAPIBase reference in the prompt; once a stale set of "carve-out" review priorities that no longer match the unasync-codegen architecture.

The fix: keep the workflow YAML stable. Project specifics live in AGENTS.md and specs/*.md, which evolve naturally with the code.

What changes

.github/workflows/claude-code-review.yml — prompt content. The workflow's on: trigger, permissions, action version, allowed-tools list, and OIDC plumbing are unchanged.

Before: 5 numbered priorities with explicit references to PolyswarmAPIBase, aio/__init__.py, ClientTestCase, polyswarm_api.aio.upload.*, VCR cassette workflow, develop/master gitflow.

After: a short opening that points the reviewer at AGENTS.md, CLAUDE.md, and specs/*.md as the source of truth, followed by generic review priorities (documented-invariant compliance, public-surface care, gitflow, test coverage) that name no specific file paths or class names.

Verification

Workflow YAML validity:

Behaviour after merge:

  • The bot's reading list at review time is the current AGENTS.md + specs/, so any conventions documented there are picked up automatically.
  • No future code-change PR will be blocked by stale prompt content.

Out of scope

This PR doesn't change AGENTS.md or any spec — those documents already carry the project specifics the prompt used to duplicate. If a spec needs to be added or rewritten (e.g., a dedicated "Review priorities" section), do it in a separate PR.

sbneto added 2 commits May 25, 2026 17:38
Push project-specific review priorities out of the workflow YAML and
into AGENTS.md / CLAUDE.md / specs/*.md — the documents that already
describe the project. The workflow prompt now states only generic
constraints (documented-invariant compliance, public-surface care,
gitflow, test coverage) and tells the reviewer where to find the
project-specific rules.

Rationale: the anthropics/claude-code-action validates the workflow
YAML byte-for-byte against the default branch before exchanging the
OIDC token. Any project specifics baked into the workflow turn into a
gate against ordinary work — every doc-shift in the codebase would
require a workflow update, which can't ride along on the same PR.
Pushing the specifics into AGENTS.md / specs/ removes that coupling:
the docs evolve freely with code, the workflow stays stable.

The bot now reads the current AGENTS.md and specs/ at review time,
so this prompt remains accurate even as the project's conventions
evolve.
Per review: keep the existing 'Focus on real issues, ordered by
severity:' opening and the numbered 'Spec drift' / 'Downstream
contract' / 'Test coverage' / 'Gitflow' priorities. The priorities
ARE specific — they target real issue classes — and the project
specifics they target live in AGENTS.md and specs/*.md, which the
prompt now points the bot at without inlining their content.

Removed every 'generic' qualifier. Each priority names the concrete
issue class it cares about and references the doc that contains the
project-specific definition (e.g. 'mock layers, cassette workflow,
parametrised harness' live in specs/04-testing.md; the version-bump
policy and gitflow rules live in AGENTS.md). The bot reads the
current docs at review time, so no project specifics need to live in
the workflow YAML.
@admin-sbneto admin-sbneto merged commit 011411d into develop May 25, 2026
1 of 2 checks passed
@admin-sbneto admin-sbneto deleted the chore/claude-code-review-generic-prompt branch May 25, 2026 22:46
sbneto added a commit that referenced this pull request May 25, 2026
…rompt

PR #301 landed the generic claude-code-review workflow prompt on
develop. Merging develop in so this PR's workflow file matches the
default branch byte-for-byte and the bot review can run again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants