RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/AGENTS.md/contentstack/contentstack-utils-javascript

AGENTS.md

AGENTS.md
AGENTS.mdroot

Quality

90/100

Scores the file, not the repository.

Length

439 words

7 headings · 0 code blocks

Repository

5

— · pushed 1 days ago

Last changed

3 days ago

First indexed 3 days ago.
contentstack/contentstack-utils-javascript/AGENTS.mdRawGitHub
1# Agent guidance — `@contentstack/utils`
2 
3## What this package is
4 
5**[@contentstack/utils](https://www.npmjs.com/package/@contentstack/utils)** (`contentstack-utils-javascript`) is a **JavaScript/TypeScript utilities library** for Contentstack. It is **not** the Content Delivery API (CDA) SDK or the Content Management API (CMA) SDK. It focuses on **JSON RTE / Supercharged RTE** rendering (`jsonToHTML`), **embedded entry and asset** rendering (`render`, `renderContent`), **GraphQL-oriented helpers** (`GQL`, `updateAssetURLForGQL`), **Live Preview–style editable tags** (`addEditableTags` / `addTags`), and **region endpoint lookup** (`getContentstackEndpoint`). Typical usage is **alongside** the Delivery SDK (see repository `README.md` examples with `@contentstack/delivery-sdk`).
6 
7- **Repository:** [github.com/contentstack/contentstack-utils-javascript](https://github.com/contentstack/contentstack-utils-javascript)
8 
9## Tech stack
10 
11| Area | Details |
12|------|---------|
13| Language | TypeScript **4.9** (`tsconfig.json`, `strict: true`, `strictNullChecks: false`) |
14| Build | **TypeScript** (`tsc`) → `dist/lib`; **Rollup** (`rollup -c`) → `dist/index.es.js`; types in `dist/types/` |
15| Test | **Jest 29** + **ts-jest**, **jsdom** environment (`jest.config.ts`) |
16| Lint / format | **ESLint 9** flat config (`eslint.config.js`); **Prettier 3** (`npm run format`) — there is **no** `lint` npm script; use `npx eslint` as needed |
17| Runtime HTTP / JSON for API calls | **None** in library code; `regions.json` is a **build-time** asset (see below) |
18 
19## Source layout and public API
20 
21| Role | Path |
22|------|------|
23| Public entry (sources) | `src/index.ts` |
24| Options / render types | `src/options/` |
25| RTE / node model | `src/Models/`, `src/nodes/` |
26| Helpers | `src/helper/` |
27| GQL + asset URL rewrite | `src/gql.ts`, `src/updateAssetURLForGQL.ts` |
28| Endpoints helper | `src/endpoints.ts` + `src/assets/regions.json` (generated; see build) |
29| Published bundle | `dist/` (per `package.json` `main` / `types`) |
30 
31## Common commands
32 
33| Command | Purpose |
34|---------|---------|
35| `npm run build` | Cleans `dist`, ensures `src/assets/regions.json` (download or warning), runs `tsc` + Rollup |
36| `npm test` | Runs `pretest` → **build**, then Jest with coverage; outputs under `reports/` |
37| `npm run test:debug` | Jest watch, in-band |
38| `npm run format` | Prettier on `src/**/*.ts` |
39| `npm run download-regions` | Fetches `regions.json` only (used by `prebuild`) |
40 
41**Tests:** Unit tests only, under `__test__/**/*.test.ts`, with mocks in `__test__/mock/`. There are **no** live/integration tests requiring stack credentials in this repository.
42 
43## Credentials / environment
44 
45- **Unit tests:** No API keys or `.env` required.
46- **Build:** `download-regions` calls a public URL (`artifacts.contentstack.com`); offline builds may warn and rely on an existing `src/assets/regions.json`. Note `regions.json` is listed in `.gitignore`; clones may need a successful `npm run build` (or manual file) before tests pass.
47- **Publish:** GitHub release workflow uses `NPM_TOKEN` / `GIT_TOKEN` secrets (maintainers only).
48 
49## More detail for AI / IDE rules
50 
51- [`.cursor/rules/README.md`](.cursor/rules/README.md) — Cursor rules index (`alwaysApply`, globs, when to use).
52- [`skills/README.md`](skills/README.md) — Topic skills (testing, code review, package mental model).
53 

Commands it names

  • tsc
  • jest.config.ts
  • eslint.config.js
  • npm run format
  • npx eslint
  • npm run build
  • npm test
  • npm run test:debug
  • npm run download-regions

Sections

  • Agent guidance — `@contentstack/utils`
  • What this package is
  • Tech stack
  • Source layout and public API
  • Common commands
  • Credentials / environment
  • More detail for AI / IDE rules

What it covers

setupbuildtestlint-formatarchitecturetesting-strategysecurityapido-notagent-behaviour

Stack — with the evidence

typescript

(1.00)

node

(1.00)

jest

(1.00)

eslint

(1.00)

javascript

(0.60)

github-actions

(0.60)

Format

AGENTS.md

A plain-markdown README for coding agents, deliberately unopinionated: no frontmatter, no globs, no vendor keys. That minimalism is why it became the one file a dozen different agents will read, and why it carries the least per-file targeting power of any format here.

What the corpus says about it

Repository

Owner
contentstack
Language
—
License
—
Archived
no

All configs in this repo

Also in contentstack/contentstack-utils-javascript

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
contentstack/contentstack-utils-javascript.cursor/rules/code-review.mdc · 5Cursor rulestypescriptjest+4testgitdependenciesapi+156/1003 days ago
contentstack/contentstack-utils-javascript.cursor/rules/testing.mdc · 5Cursor rulestypescriptjest+4buildteststyletesting-strategy71/1003 days ago
contentstack/contentstack-utils-javascript.cursor/rules/typescript-contentstack-utils.mdc · 5Cursor rulestypescriptjest+4styledocs56/1003 days ago
contentstack/contentstack-utils-javascript.cursor/rules/typescript.mdc · 5Cursor rulestypescriptjest+4testlint-formatstylearch+282/1003 days ago
Diff against .cursor/rules/code-review.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/typescript-contentstack-utils.mdc Diff against .cursor/rules/typescript.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
trick77/agents-md-syncAGENTS.md · 2AGENTS.mdtypescriptnode+4setupbuildteststyle+5100/1003 days ago
SkeneTechnologies/skene-cookbookAGENTS.md · 51AGENTS.mdpythoneslint+4setupbuildtestlint-format+7100/1002 days ago
duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70AGENTS.mdtypescriptjavascript+5buildteststylearch+3100/1003 days ago
mui/material-uiAGENTS.md · 99kAGENTS.mdtypescriptjavascript+13setupbuildtestlint-format+9100/1003 days ago
n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199kAGENTS.mdtypescriptlangchain+16buildteststylearch+3100/1003 days ago
aaif-goose/gooseAGENTS.md · 52kAGENTS.mdrusttypescript+2setupbuildtestlint-format+6100/1003 days ago
TryGhost/Ghoste2e/AGENTS.md · 55kAGENTS.mdtypescriptjavascript+12setupteststylearch+2100/1003 days ago
code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67kAGENTS.mdtypescriptbun+10setupbuildtestlint-format+6100/1002 days ago
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