|
| 1 | +# @contentstack/core – 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-js-core](https://github.com/contentstack/contentstack-js-core) (`@contentstack/core`) | |
| 10 | +| **Purpose:** | TypeScript core library: HTTP client wiring, errors, serialization, retries—shared by Contentstack TS SDKs. | |
| 11 | +| **Out of scope:** | Not an end-user SDK; apps should use the Delivery SDK, which depends on this package. | |
| 12 | + |
| 13 | +## Tech stack (at a glance) |
| 14 | + |
| 15 | +| Area | Details | |
| 16 | +|------|---------| |
| 17 | +| Language | TypeScript (see `typescript` in `package.json`; `config/tsconfig.*.json`) | |
| 18 | +| Build | `tsc` (CJS/ESM/types) + Webpack UMD (`config/webpack.config.js`, `tools/`) | |
| 19 | +| Tests | Jest → `test/` (`npm test` → `jest ./test`) | |
| 20 | +| Lint / coverage | ESLint `.eslintrc.js` (`npm run lint`) | |
| 21 | +| CI | `.github/workflows/unit-test.yml`, `check-branch.yml`, `sca-scan.yml`, `policy-scan.yml`, `codeql-analysis.yml` | |
| 22 | + |
| 23 | +## Commands (quick reference) |
| 24 | + |
| 25 | +| Command type | Command | |
| 26 | +|--------------|---------| |
| 27 | +| Build | `npm run build` | |
| 28 | +| Test | `npm test` | |
| 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, CI, npm scripts, Husky, release notes | |
| 36 | +| **Contentstack core (package)** | [`skills/contentstack-core/SKILL.md`](skills/contentstack-core/SKILL.md) | `@contentstack/core` boundaries, public surface, dependency role | |
| 37 | +| **TypeScript & layout** | [`skills/typescript/SKILL.md`](skills/typescript/SKILL.md) | `src/`, `config/` tsconfigs, ESM/CJS/UMD outputs | |
| 38 | +| **Testing** | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest layout, mocks, fixtures | |
| 39 | +| **Code review** | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR expectations and checklist | |
| 40 | + |
| 41 | +## Using Cursor (optional) |
| 42 | + |
| 43 | +If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`**—same docs as everyone else. |
0 commit comments