RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/contentstack/contentstack-javascript/diff

Two files, one repository

contentstack/contentstack-javascript ships 2 formats across 5 indexed files. The question worth asking is whether the second one says anything the first does not.

CompareAGENTS.md ↔ Cursor rules
A · AGENTS.md · 289 wordsB · .cursor/rules/code-review.mdc · 223 words
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections0670%
Commands0600%
Section tags24518%

What each file covers

Sections

0 shared · 6 only in A · 7 only in B
  • − Contentstack JavaScript Delivery SDK – Agent guide
  • − What this repo is
  • − Tech stack (at a glance)
  • − Commands (quick reference)
  • − Where the documentation lives: skills
  • − Using Cursor (optional)
  • + Code review checklist (CDA JavaScript SDK)
  • + Public API & documentation
  • + Backward compatibility
  • + Errors & safety
  • + Dependencies & supply chain
  • + Tests
  • + Security & privacy

Commands

0 shared · 6 only in A · 0 only in B
  • − npm run build
  • − jest.js.config.js
  • − jest.config.js
  • − npm run lint
  • − npm-publish.yml
  • − npm test

Section tags

2 shared · 4 only in A · 5 only in B
  • − build
  • − lint-format
  • − code-style
  • − agent-behaviour
  • + git-pr
  • + security
  • + dependencies
  • + api
  • + do-not
  •   test
  •   docs

Line diff

+27 added−32 removed12 unchanged27.3% identical
contentstack/contentstack-javascript · AGENTS.md
@@ −1 @@
1# Contentstack JavaScript Delivery SDK – Agent guide
 
 
 
2 
3**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
4 
5## What this repo is
6 
7| Field | Detail |
8|--------|--------|
9| **Name:** | [contentstack-javascript](https://github.com/contentstack/contentstack-javascript) (npm package **`contentstack`**) |
10| **Purpose:** | Legacy **JavaScript** Content Delivery SDK for browsers, Node.js, React Native, and NativeScript—stack initialization, queries, entries, assets. |
11| **Out of scope:** | Not the TypeScript-first **`@contentstack/delivery-sdk`** (`contentstack-typescript`); new TypeScript projects should prefer that package when appropriate. |
12 
13## Tech stack (at a glance)
 
14 
15| Area | Details |
16|------|---------|
17| Language | JavaScript in **`src/`**; TypeScript tests via Jest (`test/typescript`) |
18| Build | Webpack configs under **`webpack/`**; outputs under **`dist/`** per target (`npm run build`) |
19| Tests | Jest: **`test:e2e`** (`jest.js.config.js`) and **`test:typescript`** (`jest.config.js`); **`pretest`** runs **`build`** first |
20| Lint / coverage | ESLint on `src` and `test` (`npm run lint`) |
21| CI | `.github/workflows/check-branch.yml`, `npm-publish.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml`, `link-check.yml`, `issues-jira.yml` |
22 
23## Commands (quick reference)
 
24 
25| Command type | Command |
26|--------------|---------|
27| Build | `npm run build` |
28| Test | `npm test` (build via `pretest`, then e2e + TypeScript Jest suites) |
29| Lint | `npm run lint` |
30 
31## Where the documentation lives: skills
 
 
32 
33| Skill | Path | What it covers |
34|-------|------|----------------|
35| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, npm scripts, Husky, CI |
36| **JavaScript SDK** | [`skills/contentstack-javascript-sdk/SKILL.md`](skills/contentstack-javascript-sdk/SKILL.md) | Public API (`Stack`, regions), `@contentstack/utils` |
37| **JavaScript tooling** | [`skills/javascript/SKILL.md`](skills/javascript/SKILL.md) | Webpack targets, `dist/` layout, Babel |
38| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest configs, e2e vs TypeScript tests |
39| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist |
40 
41## Using Cursor (optional)
 
42 
43If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
 
 
 
 
 
 
 
44 
contentstack/contentstack-javascript · .cursor/rules/code-review.mdc
@@ +1 @@
1---
2description: "PR review themes — API docs, compatibility, errors, security, tests (CDA SDK)"
3alwaysApply: true
4---
5 
6# Code review checklist (CDA JavaScript SDK)
7 
8Apply when reviewing changes to the **`contentstack`** npm package (Content Delivery API client).
9 
10## Public API & documentation
 
 
 
 
11 
12- **JSDoc** updated for new or changed public methods/classes (params, return shape, examples), matching style in `src/core/contentstack.js` / `src/core/stack.js`.
13- **`index.d.ts`** updated when TypeScript consumers would see different signatures or new exports.
14 
15## Backward compatibility
 
 
 
 
 
 
16 
17- Avoid breaking changes to exported function signatures, option objects, or default behavior without a major version rationale.
18- If behavior changes, ensure **callers inside `src/`** and tests reflect the new contract.
19 
20## Errors & safety
 
 
 
 
21 
22- HTTP failures should continue to reject with a predictable shape from **`src/core/lib/request.js`** where applicable (**`error_message`**, **`error_code`**, **`errors`**, **`status`**, **`statusText`**).
23- Do not log full **delivery_token**, **preview_token**, **management_token**, or **api_key** values.
24- Respect **null/undefined** edge cases for optional API fields.
25 
26## Dependencies & supply chain
 
 
 
 
 
 
27 
28- New **dependencies** should be justified (size, maintenance, license).
29- Lockfile and **`package.json`** version bumps should be minimal and reviewable.
30 
31## Tests
32 
33- **Jest** tests for new logic or regressions under **`test/`** (JS and/or **`test/typescript/`** as appropriate).
34- Live stack tests must remain compatible with **`test/config.js`** env requirements; document new env needs in **`test/README.md`** or comments near the harness — never commit credentials.
35 
36## Security & privacy
37 
38- No hardcoded credentials; no accidental exposure of customer content in logs or error messages.
39 
@@ −1 +1 @@
1−# Contentstack JavaScript Delivery SDK – Agent guide
1+---
2+description: "PR review themes — API docs, compatibility, errors, security, tests (CDA SDK)"
3+alwaysApply: true
4+---
25  
3−**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
6+# Code review checklist (CDA JavaScript SDK)
47  
5−## What this repo is
8+Apply when reviewing changes to the **`contentstack`** npm package (Content Delivery API client).
69  
7−| Field | Detail |
8−|--------|--------|
9−| **Name:** | [contentstack-javascript](https://github.com/contentstack/contentstack-javascript) (npm package **`contentstack`**) |
10−| **Purpose:** | Legacy **JavaScript** Content Delivery SDK for browsers, Node.js, React Native, and NativeScript—stack initialization, queries, entries, assets. |
11−| **Out of scope:** | Not the TypeScript-first **`@contentstack/delivery-sdk`** (`contentstack-typescript`); new TypeScript projects should prefer that package when appropriate. |
10+## Public API & documentation
1211  
13−## Tech stack (at a glance)
12+- **JSDoc** updated for new or changed public methods/classes (params, return shape, examples), matching style in `src/core/contentstack.js` / `src/core/stack.js`.
13+- **`index.d.ts`** updated when TypeScript consumers would see different signatures or new exports.
1414  
15−| Area | Details |
16−|------|---------|
17−| Language | JavaScript in **`src/`**; TypeScript tests via Jest (`test/typescript`) |
18−| Build | Webpack configs under **`webpack/`**; outputs under **`dist/`** per target (`npm run build`) |
19−| Tests | Jest: **`test:e2e`** (`jest.js.config.js`) and **`test:typescript`** (`jest.config.js`); **`pretest`** runs **`build`** first |
20−| Lint / coverage | ESLint on `src` and `test` (`npm run lint`) |
21−| CI | `.github/workflows/check-branch.yml`, `npm-publish.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml`, `link-check.yml`, `issues-jira.yml` |
15+## Backward compatibility
2216  
23−## Commands (quick reference)
17+- Avoid breaking changes to exported function signatures, option objects, or default behavior without a major version rationale.
18+- If behavior changes, ensure **callers inside `src/`** and tests reflect the new contract.
2419  
25−| Command type | Command |
26−|--------------|---------|
27−| Build | `npm run build` |
28−| Test | `npm test` (build via `pretest`, then e2e + TypeScript Jest suites) |
29−| Lint | `npm run lint` |
20+## Errors & safety
3021  
31−## Where the documentation lives: skills
22+- HTTP failures should continue to reject with a predictable shape from **`src/core/lib/request.js`** where applicable (**`error_message`**, **`error_code`**, **`errors`**, **`status`**, **`statusText`**).
23+- Do not log full **delivery_token**, **preview_token**, **management_token**, or **api_key** values.
24+- Respect **null/undefined** edge cases for optional API fields.
3225  
33−| Skill | Path | What it covers |
34−|-------|------|----------------|
35−| **Development workflow** | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches, npm scripts, Husky, CI |
36−| **JavaScript SDK** | [`skills/contentstack-javascript-sdk/SKILL.md`](skills/contentstack-javascript-sdk/SKILL.md) | Public API (`Stack`, regions), `@contentstack/utils` |
37−| **JavaScript tooling** | [`skills/javascript/SKILL.md`](skills/javascript/SKILL.md) | Webpack targets, `dist/` layout, Babel |
38−| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest configs, e2e vs TypeScript tests |
39−| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist |
26+## Dependencies & supply chain
4027  
41−## Using Cursor (optional)
28+- New **dependencies** should be justified (size, maintenance, license).
29+- Lockfile and **`package.json`** version bumps should be minimal and reviewable.
4230  
43−If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else.
31+## Tests
32+ 
33+- **Jest** tests for new logic or regressions under **`test/`** (JS and/or **`test/typescript/`** as appropriate).
34+- Live stack tests must remain compatible with **`test/config.js`** env requirements; document new env needs in **`test/README.md`** or comments near the harness — never commit credentials.
35+ 
36+## Security & privacy
37+ 
38+- No hardcoded credentials; no accidental exposure of customer content in logs or error messages.
4439  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack