Skip to content

Commit 69cf608

Browse files
docs(DX-6047): add AGENTS.md, skills, and Cursor rules entry
1 parent 198c18c commit 69cf608

14 files changed

Lines changed: 123 additions & 384 deletions

File tree

.cursor/rules/README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,5 @@
1-
# Cursor Rules – Contentstack Java CDA SDK
1+
# Cursor (optional)
22

3-
This directory contains Cursor AI rules that apply when working in this repository. Rules provide persistent context so the AI follows project conventions and Contentstack CDA patterns.
3+
**Cursor** users: start at **[AGENTS.md](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**.
44

5-
## How rules are applied
6-
7-
- **File-specific rules** use the `globs` frontmatter: they apply when you open or edit files matching that pattern.
8-
- **Always-on rules** use `alwaysApply: true`: they are included in every conversation in this project.
9-
10-
## Rule index
11-
12-
| File | Applies when | Purpose |
13-
|------|--------------|---------|
14-
| **dev-workflow.md** | (Reference only; no glob) | Core development workflow: branches, running tests, PR expectations. Read for process guidance. |
15-
| **java.mdc** | Editing any `**/*.java` file | Java 8 standards: naming, package layout, `com.contentstack.sdk` structure, logging, Lombok/annotations, avoiding raw types. |
16-
| **contentstack-java-cda.mdc** | Editing `src/main/java/com/contentstack/sdk/**/*.java` | CDA-specific patterns: Stack/Config, host/version/region/branch, RetryOptions/RetryInterceptor, callbacks, alignment with Content Delivery API. |
17-
| **testing.mdc** | Editing `src/test/**/*.java` | Testing patterns: JUnit 5, unit vs integration naming (`Test*` vs `*IT`), BaseIntegrationTest, timeouts, JaCoCo. |
18-
| **code-review.mdc** | Always | PR/review checklist: API stability, error handling, backward compatibility, dependencies and security (e.g. SCA). |
19-
20-
## Related
21-
22-
- **AGENTS.md** (repo root) – Main entry point for AI agents: project overview, entry points, and pointers to rules and skills.
23-
- **skills/** – Reusable skill docs (Contentstack Java CDA, testing, code review, framework) for deeper guidance on specific tasks.
5+
This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs.

.cursor/rules/code-review.mdc

Lines changed: 0 additions & 36 deletions
This file was deleted.

.cursor/rules/contentstack-java-cda.mdc

Lines changed: 0 additions & 35 deletions
This file was deleted.

.cursor/rules/dev-workflow.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.cursor/rules/java.mdc

Lines changed: 0 additions & 41 deletions
This file was deleted.

.cursor/rules/testing.mdc

Lines changed: 0 additions & 35 deletions
This file was deleted.

AGENTS.md

Lines changed: 32 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,43 @@
1-
# Contentstack Java CDA SDK – Agent Guide
1+
# Contentstack Java Delivery SDK – Agent guide
22

3-
This document is the main entry point for AI agents working in this repository.
3+
**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
44

5-
## Project
5+
## What this repo is
66

7-
- **Name:** Contentstack Java CDA SDK (contentstack-java)
8-
- **Purpose:** Java client for the Contentstack **Content Delivery API (CDA)**. It fetches content (entries, assets, content types, sync, taxonomy) from Contentstack and delivers it to Java applications.
9-
- **Repo:** [contentstack-java](https://github.com/contentstack/contentstack-java)
7+
| Field | Detail |
8+
|--------|--------|
9+
| **Name:** | [contentstack-java](https://github.com/contentstack/contentstack-java) (`com.contentstack.sdk:java`) |
10+
| **Purpose:** | Java SDK for the Contentstack Content Delivery API (stack, entries, assets, queries, sync, etc.). |
11+
| **Out of scope:** | Not the Android or Swift SDKs—use those repositories for mobile-specific clients. |
1012

11-
## Tech stack
13+
## Tech stack (at a glance)
1214

13-
- **Language:** Java 8 (source/target 1.8)
14-
- **Build:** Maven
15-
- **Testing:** JUnit 5, JaCoCo (coverage)
16-
- **HTTP:** Retrofit 2, OkHttp
17-
- **Other:** Gson, RxJava 3, Lombok, contentstack-utils
15+
| Area | Details |
16+
|------|---------|
17+
| Language | Java **8** (`maven.compiler.source/target` in `pom.xml`) |
18+
| Build | Maven (`pom.xml`); JaCoCo for coverage |
19+
| Tests | JUnit 5; unit tests and `*IT` integration tests under `src/test/java/` |
20+
| Lint / coverage | JaCoCo (`jacoco:report` in CI); no separate Checkstyle in quick path—follow existing style |
21+
| CI | `.github/workflows/unit-testing.yml`, `check-branch.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml`, publish workflows |
1822

19-
## Main entry points
23+
## Commands (quick reference)
2024

21-
- **`Contentstack`** – Static factory: `Contentstack.stack(apiKey, deliveryToken, environment)` returns a `Stack`.
22-
- **`Stack`** – Main API surface: entries, assets, content types, sync, live preview, etc.
23-
- **`Config`** – Optional configuration: host, version, region, branch, retry, proxy, connection pool, plugins.
24-
- **Paths:** `src/main/java/com/contentstack/sdk/` (production), `src/test/java/com/contentstack/sdk/` (tests).
25+
| Command type | Command |
26+
|--------------|---------|
27+
| Build / test | `mvn clean test -Dgpg.skip=true` (adjust `-Dtest` per `pom.xml` surefire notes) |
28+
| Coverage (CI-style) | `mvn clean test -Dtest='Test*' jacoco:report -Dgpg.skip=true` |
2529

26-
## Commands
30+
## Where the documentation lives: skills
2731

28-
- **Build and test:** `mvn clean test`
29-
- **Single test class:** `mvn test -Dtest=TestEntry`
30-
- **Integration tests only:** `mvn test -Dtest='*IT'`
31-
- **Unit tests only:** `mvn test -Dtest='Test*'`
32+
| Skill | Path | What it covers |
33+
|-------|------|----------------|
34+
| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, Maven, CI, JaCoCo |
35+
| **Java CDA SDK** | [`skills/contentstack-java-cda/SKILL.md`](skills/contentstack-java-cda/SKILL.md) | Public API: `Stack`, queries, callbacks, HTTP layer |
36+
| **Java style & layout** | [`skills/java/SKILL.md`](skills/java/SKILL.md) | `src/main/java` packages, Lombok, Retrofit/Rx usage |
37+
| **Framework / HTTP** | [`skills/framework/SKILL.md`](skills/framework/SKILL.md) | Config, RetryOptions, CSHttpConnection, OkHttp/Retrofit flow |
38+
| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Unit vs integration tests, resources, credentials |
39+
| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist for JVM SDK |
3240

33-
Integration tests may require a `.env` with stack credentials (see `Credentials` and test README/docs).
41+
## Using Cursor (optional)
3442

35-
## Rules and skills
36-
37-
- **`.cursor/rules/`** – Cursor rules for this repo:
38-
- **README.md** – Index of all rules.
39-
- **dev-workflow.md** – Development workflow (branches, tests, PRs).
40-
- **java.mdc** – Applies to `**/*.java`: Java 8 and SDK conventions.
41-
- **contentstack-java-cda.mdc** – Applies to SDK core: CDA patterns, Config, HTTP, retry, callbacks.
42-
- **testing.mdc** – Applies to `src/test/**/*.java`: JUnit 5, Test* / *IT, BaseIntegrationTest, JaCoCo.
43-
- **code-review.mdc** – Always applied: PR/review checklist.
44-
- **`skills/`** – Reusable skill docs:
45-
- Use **contentstack-java-cda** when implementing or changing CDA API usage or SDK core behavior.
46-
- Use **testing** when adding or refactoring tests.
47-
- Use **code-review** when reviewing PRs or before opening one.
48-
- Use **framework** when changing config, retry, or HTTP layer (Config, RetryOptions, RetryInterceptor, CSHttpConnection).
49-
50-
Refer to `.cursor/rules/README.md` for when each rule applies and to `skills/README.md` for skill details.
43+
If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.

skills/README.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)