artifact-swap / ai-rules
AGENTS.md17 starsChanged 10 months agoApache-2.0View on GitHub
Base respository guidelines
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/ai-rules-generated-AGENTS.mdcCursor rule
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
When generating Kotlin code where you are importing a class/function from another package, make sure you reference that class/function …
- Very specific: line 37
Run all tests: ./gradlew test.
- Very specific: line 38
Test fixtures available in core via java-test-fixtures and testFixtures(...) dependencies.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines
This repository contains Artifact Swap, a Gradle tooling suite that accelerates configuration for large Kotlin/Java projects by swapping local projects with published artifacts when appropriate. These guidelines summarize how the repo is structured, built, tested, and contributed to, based strictly on files in this repo.
Project Structure & Module Organization
- Root Gradle build with settings in
settings.gradle.kts; modules::cli,:core,:gradle-plugin. - Convention plugins live in
build-logic/(notablyconventions), applied viapluginManagement.includeBuild("build-logic"). - Source code:
- CLI:
cli/src/main/kotlin/**with tests incli/src/test/kotlin/**. - Core library:
core/src/main/kotlin/**with tests andtestFixturesincore/src/test*/kotlin/**. - Gradle plugins:
gradle-plugin/src/main/kotlin/**(plus one Groovy source in.../src/main/groovy/**).
- CLI:
Build, Test, and Development Commands
- Local quickstart:
./gradlew build(per CONTRIBUTING.md). - Formatting:
./gradlew ktfmtCheckand./gradlew ktfmtFormat(configured via ChecksPlugin). - Tests:
./gradlew test(JUnit Platform); GitHub Actions also runs./gradlew buildHealthand./gradlew lint. - CLI E2E (as in CI):
./gradlew :cli:publishToMavenLocalVERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2)cd ~/.m2/repository/xyz/block/artifactswap/cli/$VERSION && unzip -q cli-$VERSION.zip./artifactswap-$VERSION/bin/artifactswap --help
- Publishing:
./gradlew publishAllPublicationsToMavenCentralRepositorywith credentials set via Gradle properties (see GitHub workflow andPublishPlugin).
Coding Style & Naming Conventions
- Kotlin code with standard 2-space indentation (inferred from sources). Formatting enforced by ktfmt via
build-logic/conventions/.../ChecksPlugin.kt. - Package naming uses
xyz.block.artifactswap.*. Gradle plugin IDs:xyz.block.artifactswap,xyz.block.artifactswap.settings,xyz.block.artifactswap.publish, andxyz.block.artifactswap.groovy-override. - Linting: Android Lint plugin enabled for Gradle checks (applies to JVM modules for Gradle config lint rules).
- When generating Kotlin code where you are importing a class/function from another package, make sure you reference that class/function using an import statement instead of the full-qualified class name.
Testing Guidelines
- Frameworks: JUnit 5 (JUnit BOM with
junit-jupiter-api), Mockito, kotlinx-coroutines-test. - Run all tests:
./gradlew test. CI usestestplusbuildHealthandlint. - Test fixtures available in
coreviajava-test-fixturesandtestFixtures(...)dependencies.
Commit & Pull Request Guidelines
- History indicates Conventional-Commit-like prefixes and PR-number references (e.g.,
Fix ... (#70), dependency updates via Renovate). - Target branch for CI is
main; markdown-only changes are ignored by CI (paths-ignore: '*.md'). - For releases to Maven Central, the
Publishworkflow triggers afterTestcompletes onmainand only forblock/artifact-swap.
Notes & TODOs
- .gitignore marks typical Gradle outputs (
**/build/,.gradle/) and IDE files. No explicit code coverage thresholds are defined; CI does not enforce coverage. - TODO: Verify any additional wrapper scripts or developer tasks beyond those in workflows and
CONTRIBUTING.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

