Add agent instructions, plan and ADR process - #489
Conversation
AGENTS.md is the instruction surface agent harnesses load automatically; CLAUDE.md points at it so Claude Code picks up the same content. Both capture what is already true about this repo — the Maven root under core/, the shim architecture, the build and test gates, and the style checks that fail CI — so an agent does not have to rediscover them from scratch each session. It also records two conventions worth writing down: - A checklist for adding Spark version support. Shim patch ranges, the Maven version property, the pyspark upper bound in setup.py, the Scala version, and the CI matrix all have to move together; a partial job builds cleanly and then fails at runtime or in packaging. - A design, testing, plan, and ADR bar. doc/plan/ and doc/adr/ get templates and are treated as historical records: a merged plan or ADR is superseded by a new document rather than rewritten, so the decision trail stays auditable. Signed-off-by: pang-wu <pang.wu.wp@gmail.com>
The release process was undocumented and lives entirely in maintainers' heads, so reconstruct it from branch-1.6, the published tags, and the two publish workflows. Records what the history actually shows: the release branch determines which Spark versions a release supports, work reaches a release branch only by cherry-pick from master with the sole exception of the version-bump commit, tags are lightweight and sit on that commit, and publishing is a manual workflow_dispatch against the tag. Also warns against bumping versions with a global search-replace. The 1.6.4 and 1.6.5 bumps each rewrote an unrelated astunparse version inside stored notebook output, so the release commits carry a change that looks intentional but is not. Signed-off-by: pang-wu <pang.wu.wp@gmail.com>
|
can we add the ADR/plan template/readme only when we write the first actual ADR/plan so it will be much clear? |
But when someone is trying to create the plan they will need a template first? I don't quite follow the concern here though |
These plan/ADR process and templates do not look like standards. I don't see them widely adopted in other popular projects. It remains a questions if we should adopt it. Different people might have different preferences whiling developing with agents. can we only include minimal and necessary info in agents.md and keep other templates and docs in your local for now? |
What does this PR do?
Adds
AGENTS.md— the instruction file that agent harnesses load automatically — plusCLAUDE.mdpointing at it so Claude Code reads the same content. It also introduces a plan and ADR process underdoc/plan/anddoc/adr/, each with a template.AGENTS.mdmostly writes down what is already true about this repo, so an agent does not have to rediscover it each session:core/, not the repo root, and-amis required when building a single module.SparkShimLoader, never Spark-versionifbranches inraydp-main../build.sh(which runs JVM tests viamvn verifyin CI) andpytest python/raydp/tests/, across the Python × Spark × Ray matrix.Two conventions are new rather than descriptive:
A checklist for adding Spark version support. Shim patch ranges, the
<sparkNMM.version>property, thepysparkupper bound inpython/setup.py, the Scala version, and the CI matrix all have to move together. A partial job compiles cleanly and then fails at shim resolution or lets pip install an unsupported PySpark. The checklist also distinguishes a new patch (widenSUPPORTED_PATCHES) from a new minor (new shim module plus one matrix entry), and says explicitly that patch versions do not belong in the matrix.A design, testing, plan, and ADR bar.
doc/plan/anddoc/adr/are treated as historical records: a merged plan or ADR is superseded by a new document rather than rewritten, so the decision trail stays auditable. ADRs land before the plan that schedules the work, so a plan never depends on an unrecorded decision.Why is this change needed?
Agent-assisted contributions are already landing here, and the context an agent needs is currently spread across
pom.xmlfiles,build.sh, and CI workflow YAML. Several things are genuinely non-obvious and easy to get wrong:raydp-mainwithout-amfails, because it depends on the shim modules.pysparkcap insetup.pyexists to match shim coverage — raising it too far silently allows an install with no shim.maven-surefire-pluginbefore 2.22 has no JUnit Platform provider and auto-selects the TestNG provider instead, discovering zero JUnit 5 tests while leaving the build green. Lowering that version would silently disable the JVM test lane.target/classesholds only the Java classes, producing bogus "not found: type" errors until a clean build.Writing these down is cheap and stops each of them from being rediscovered the hard way.
Related Issue
Fixes #
Type of Change
How was this tested?
Documentation only — no code, build, or CI configuration changes, so no behavior to test.
Every path, filename, plugin version, and configuration value referenced in the new files was verified against the tree at
01ca3bf, including:Internal markdown links between
AGENTS.md,doc/plan/, anddoc/adr/were checked to resolve.Checklist