Skip to content

Add AI/agent contribution guidance#2372

Open
leonard84 wants to merge 3 commits into
spockframework:masterfrom
leonard84:ai-contribution-guidance
Open

Add AI/agent contribution guidance#2372
leonard84 wants to merge 3 commits into
spockframework:masterfrom
leonard84:ai-contribution-guidance

Conversation

@leonard84

Copy link
Copy Markdown
Member

Adds guidance for AI-assisted and agent-driven contributions, plus an AGENTS.md to help coding agents work in this repo correctly.

Changes

  • AGENTS.md (new): repo conventions for coding agents. Points at CONTRIBUTING.adoc for the authoritative standards, and captures a few things agents otherwise get wrong: tests for spock-core live in spock-specs, fork-aware git remotes, the snapshot-test workflow (-PupdateSnapshots, snapshotId), and Groovy/Java variant selection. A scoped .github/workflows/AGENTS.md covers the *.main.kts -> YAML regeneration step. CLAUDE.md files just @-import the AGENTS.md so both Claude and AGENTS.md-based tooling pick up the guidance without duplication.
  • AI_POLICY.md (new): states that AI-assisted contributions are welcome, provided the contributor understands the code well enough to judge and stand behind the output, and that we strongly prefer issues/discussion over large unsolicited pull requests.
  • CONTRIBUTING.adoc: new "Avoiding AI Slop" section with concrete, practical guidance (em-dashes, filler, diff-restating prose, emoji), linking to the AI policy.

AI involvement

Disclosed per the new policy: this PR was drafted with AI assistance and reviewed before submission.

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3fdc2ed-f2d1-4ad2-abd7-5503d1b7962e

📥 Commits

Reviewing files that changed from the base of the PR and between 7384835 and 261f7e8.

📒 Files selected for processing (1)
  • CONTRIBUTING.adoc

📝 Walkthrough

Walkthrough

Adds an AI-assisted contribution policy, an AGENTS guide with repo-specific agent/testing instructions, an “Avoiding AI Slop” contributor subsection, and documentation that GitHub Actions YAML are generated from Kotlin DSL and must be regenerated after edits.

Changes

AI Contribution Framework

Layer / File(s) Summary
AI Contribution Policy Foundation
AI_POLICY.md
Comprehensive AI-assisted contribution policy describing contributor expectations, maintainer responsibilities, and enforcement.
Contributor AI Output Quality Standards
CONTRIBUTING.adoc
Adds "Avoiding AI Slop" subsection instructing contributors to review and remove noisy or filler AI-generated content before submission.
Agent Instructions and Central References
AGENTS.md, .claude/CLAUDE.md, .github/workflows/CLAUDE.md
Introduces AGENTS.md with repo-specific agent guidance (test-module location, upstream remote, snapshot testing rules, variant/javaVersion usage) and adds references from agent discovery files to the central doc.
Workflow Generation Documentation
.github/workflows/AGENTS.md
Documents that GitHub Actions *.yaml workflows are generated from *.main.kts Kotlin DSL sources and must be regenerated with ./gradlew preprocessWorkflows after edits to keep CI in sync.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • spockframework/spock#2361: Updates workflow README and documents *.main.kts/YAML generation practices related to this PR's workflow guidance.

Suggested reviewers

  • Vampire
  • AndreasTu

Poem

🐰 I nibble docs with tidy care,
I trim the slop and comb each line,
Workflows hum when Kotlin's fair,
Policies hop in order fine,
A carrot-coded chorus, bright and fine.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add AI/agent contribution guidance' directly and clearly describes the main change—adding new documentation and guidance for AI-assisted and agent-driven contributions.
Description check ✅ Passed The description is well-related to the changeset, clearly explaining the new AGENTS.md, AI_POLICY.md, and updates to CONTRIBUTING.adoc with specific details about what each document covers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

@greptile-apps

greptile-apps Bot commented Jun 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces AI/agent contribution infrastructure: a root AGENTS.md with repo-specific guidance for coding agents, an AI_POLICY.md setting expectations for AI-assisted contributions, and a new "Avoiding AI Slop" section in CONTRIBUTING.adoc. Scoped AGENTS.md/CLAUDE.md files under .github/workflows/ and .claude/ wire the guidance into Claude Code and AGENTS.md-compatible tooling via import directives.

  • AGENTS.md captures agent-specific pitfalls: snapshot test workflow (-PupdateSnapshots), spock-specs as the test module for spock-core, fork-aware remote usage, and Groovy/Java variant selection.
  • AI_POLICY.md sets community expectations around disclosure, understanding, and preferring issues over large unsolicited pull requests.
  • CONTRIBUTING.adoc gains a practical checklist of AI output patterns to prune before opening a PR (em-dashes, filler prose, diff-restating descriptions, emoji).

Confidence Score: 4/5

Documentation-only change that is safe to merge, but the Claude guidance file won't be picked up by Claude Code on Linux until the filename casing is corrected.

All changes are documentation. The one functional concern is that .claude/Claude.md uses mixed casing instead of the all-caps CLAUDE.md that Claude Code resolves on case-sensitive filesystems; on Linux this file is silently ignored and Claude agents won't receive the AGENTS.md guidance. The .github/workflows/CLAUDE.md counterpart is correctly named. Everything else — AGENTS.md, AI_POLICY.md, and the CONTRIBUTING.adoc additions — is clear and accurate.

.claude/Claude.md — needs to be renamed to .claude/CLAUDE.md so Claude Code loads it on Linux.

Important Files Changed

Filename Overview
.claude/Claude.md File is named Claude.md instead of the required CLAUDE.md; Claude Code will not load it on case-sensitive filesystems, making the import of AGENTS.md ineffective.
AGENTS.md New agent guidance file with concise, accurate instructions for snapshot tests, Groovy/Java variant selection, and fork-aware git remotes.
AI_POLICY.md New AI contribution policy; well-written and appropriately scoped. No code concerns.
CONTRIBUTING.adoc Adds "Avoiding AI Slop" section with concrete guidance on em-dashes, filler prose, and emoji; content is consistent with the repo's existing style.
.github/workflows/AGENTS.md Scoped guidance file reminding agents never to edit generated YAML directly and to run ./gradlew preprocessWorkflows after changing .main.kts files.
.github/workflows/CLAUDE.md One-line Claude import file pointing at the collocated AGENTS.md; correctly named CLAUDE.md for Claude Code tooling.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Claude Code agent starts session] --> B{Directory?}
    B -->|root| C[".claude/CLAUDE.md (expected)\n.claude/Claude.md (actual — wrong case)"]
    B -->|.github/workflows/| D[".github/workflows/CLAUDE.md ✓"]
    C -->|import '@../AGENTS.md'| E["Root AGENTS.md\n- spock-specs test module\n- snapshot workflow\n- fork-aware remotes\n- Groovy variant flags\n- CONTRIBUTING.adoc"]
    D -->|import '@AGENTS.md'| F[".github/workflows/AGENTS.md\n- Never edit YAML directly\n- Run preprocessWorkflows\n- Commit both .kts + YAML"]
    C -. "NOT loaded on Linux\n(case-sensitive FS)" .-> E
Loading

Reviews (1): Last reviewed commit: "Add Avoiding AI Slop section to contribu..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.adoc`:
- Around line 62-64: The three bullet lines in the CONTRIBUTING.adoc fragment
(the bullets starting with "Typographic tells such as em-dashes (`--`).",
"Generic filler and marketing tone (\"This elegant solution leverages...\", \"In
today's fast-paced world...\").", and "Over-explaining the obvious in comments,
commit messages, or descriptions. Comment the why, not the what.") each contain
two sentences on a single line—split each into separate lines so there is one
sentence per line; preserve the exact sentence text and list order and ensure
the lines remain bullets under the same list (follow the "one sentence per line"
Asciidoc convention referenced in the Code Standards/Avoiding AI Slop guidance).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d3ffa996-8da9-4255-b7c1-43bc933996ed

📥 Commits

Reviewing files that changed from the base of the PR and between 7313c19 and 29ba0aa.

📒 Files selected for processing (6)
  • .claude/Claude.md
  • .github/workflows/AGENTS.md
  • .github/workflows/CLAUDE.md
  • AGENTS.md
  • AI_POLICY.md
  • CONTRIBUTING.adoc

Comment thread CONTRIBUTING.adoc Outdated
Comment thread .claude/CLAUDE.md
@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.18%. Comparing base (7313c19) to head (261f7e8).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2372   +/-   ##
=========================================
  Coverage     82.18%   82.18%           
+ Complexity     4832     4831    -1     
=========================================
  Files           473      473           
  Lines         15051    15051           
  Branches       1912     1912           
=========================================
  Hits          12369    12369           
  Misses         1991     1991           
  Partials        691      691           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

leonard84 added 2 commits June 7, 2026 17:29
Document repo conventions for coding agents: spock-specs test location,
fork-aware git remotes, snapshot-test workflow (-PupdateSnapshots,
snapshotId), and Groovy/Java variant selection.

Add a scoped .github/workflows/AGENTS.md covering the *.main.kts to YAML
regeneration step, and CLAUDE.md importers (@AGENTS.md) so both Claude
and AGENTS.md-based tooling pick up the guidance without duplication.
Welcome AI-assisted contributions while asking contributors to understand
and stand behind what they submit, and to prefer issues or discussions
over large unsolicited pull requests.
@leonard84 leonard84 force-pushed the ai-contribution-guidance branch from 29ba0aa to 7384835 Compare June 7, 2026 15:29
@leonard84 leonard84 requested a review from a team June 7, 2026 15:30
@leonard84 leonard84 self-assigned this Jun 7, 2026
Give contributors concrete, practical guidance on trimming AI-generated
noise (em-dashes, filler, diff-restating prose, emoji), and link to the
AI policy.
@leonard84 leonard84 force-pushed the ai-contribution-guidance branch from 7384835 to 261f7e8 Compare June 7, 2026 15:33
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