Skip to content

Add agent-readable docs, AGENTS.md, and restructure README - #391

Open
const-cloudinary wants to merge 1 commit into
masterfrom
agent-docs
Open

const-cloudinary wants to merge 1 commit into
masterfrom
agent-docs

Conversation

@const-cloudinary

Copy link
Copy Markdown
Member

Summary

Adds task documentation for AI coding agents that use the SDK, a contributor guide for agents working on this repository, and a restructured README. No source changes.

Item Purpose
docs/ (16 pages) Task pages for agents using the SDK: credentials, dependency and first call, configuration, image upload, large/raw upload, signed browser upload, image and video delivery, search and asset management, moderation, structured metadata, Spring Boot, JSP taglib, troubleshooting, platform capabilities
examples/ (4 programs) Runnable versions of the upload, large-video upload, delivery, and search tasks
AGENTS.md, CLAUDE.md Contributor guide for agents; CLAUDE.md contains only @AGENTS.md
SECURITY.md Private reporting via GitHub advisories, plus server-side usage guidance
context7.json Context7 indexing; same account key as cloudinary_npm and pycloudinary
README.md Restructured to the same section list as the other Cloudinary SDKs
.gitignore Artifacts left behind by running the examples

README fixes: the install snippet named cloudinary-http45 with a 2.x version, which has never been published. It now names cloudinary-http5 with an X.Y.Z placeholder and points to Maven Central for the current version. The GitHub issues link pointed at a non-existent org.

Why docs/ is not packaged into a jar

docs/ stays in the repository and is not added to any artifact.

  • Of 15 widely used Java libraries on Maven Central (Guava, OkHttp, Jackson, Gson, commons-lang3, SLF4J, Retrofit, AWS SDK v2, google-cloud-storage, Stripe, Twilio, SendGrid, java-jwt, Spring Core, jsoup), only jsoup ships any Markdown: a 3 KB README in META-INF/.
  • Embedding the pages would grow cloudinary-core by about 27% (175 KB → 223 KB) for files no runtime reads.
  • A resource inside a jar is not a file an agent can open without first locating the jar and unpacking it. Reading the repository at the matching release tag, or Cloudinary's llms.txt / .md documentation URLs, is shorter.

examples/ is not packaged either. Each doc page carries its complete flow inline.

Verification

Check Result
java snippets compile against the built 2.5.0 jars (fragments wrapped in a harness; Spring and servlet types stubbed) 103/103
Examples compile with --release 8 4/4
Internal links and cross-page anchors 0 errors
External URLs 37/38 return 200; the link to tree/master/docs resolves once this is merged
:cloudinary-http5:test, base (c9920c8) vs branch, each on a fresh product environment 206 tests, 0 failed, 39 skipped on both
:cloudinary-core:test on branch 275 tests, 0 failed

Behaviour described in the pages was observed against live product environments while the pages were being written. The examples were run live, including no-credential and bad-credential runs, before the rebase onto 2.5.0. After the rebase they were compiled, not re-run.

Snippets are reference voice: they show correct usage and state documented behaviour.

Known limitation: the Spring Boot controller snippet uses Map.of, which needs Java 9+. That matches Spring Boot 3 (Java 17).

Needs a maintainer

  • Context7: register cloudinary/cloudinary_java at context7.com. context7.json is inert until then.
  • Repository metadata: description, homepage, topics, and social preview.
  • CONTRIBUTING.md: the old README linked it, but it does not exist. The link was removed, not replaced.
  • docs: agent-optimize README + add AGENTS.md/CLAUDE.md and IDE pointer files #388 (outside PR) adds AGENTS.md/CLAUDE.md and IDE pointer files and overlaps with this one. Left open for a maintainer to decide.

🤖 Generated with Claude Code

- docs/: 16 task pages for coding agents using the SDK (setup, upload,
  large/raw upload, signed browser upload, image/video delivery, search
  and asset management, moderation, structured metadata, Spring Boot,
  JSP taglib, troubleshooting, platform capabilities). Not packaged into
  any jar.
- examples/: four runnable programs matching the doc pages.
- AGENTS.md (with CLAUDE.md pointing to it): contributor guide for agents.
- SECURITY.md: private reporting path and server-side usage guidance.
- context7.json for Context7 indexing.
- README.md: restructured; install snippet now names cloudinary-http5
  with an X.Y.Z placeholder; fixed the GitHub issues link.
- .gitignore: artifacts left by running the examples.

No source changes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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