Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .cursor/commands/execute-tests.md

This file was deleted.

32 changes: 4 additions & 28 deletions .cursor/rules/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,7 @@
# Cursor rules for contentstack-apps-cli
# Cursor (optional)

Rules in this directory load based on file context. Skills hold the long-form guidance.
**Cursor** users: start at **[AGENTS.md](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**.

## Files
This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs.

| Rule | When it applies |
|------|-----------------|
| `dev-workflow.md` | Always (lightweight workflow + TDD) |
| `typescript.mdc` | TypeScript / TSX sources |
| `testing.mdc` | Test files under `test/**/*.test.ts` |
| `oclif-commands.mdc` | CLI commands and base command classes |
| `contentstack-apps.mdc` | Utils, factories, strategies, GraphQL, config, types, messages |

## Expected combinations (examples)

- Editing `src/commands/app/*.ts` — typically `dev-workflow`, `typescript`, `oclif-commands`
- Editing `test/unit/.../*.test.ts` — `dev-workflow`, `typescript`, `testing`
- Editing `src/util/*.ts` or `src/graphql/*.ts` — `dev-workflow`, `typescript`, `contentstack-apps`

## Skills

Project skills live in `.cursor/skills/<name>/SKILL.md`. Reference them in chat, for example:

- `@skills/testing`
- `@skills/apps-cli-framework`
- `@skills/contentstack-apps`

## Optional commands

Slash-style workflows (if enabled in your Cursor setup) live in `.cursor/commands/`.
Path to AGENTS.md: from `.cursor/rules/README.md` use `../../AGENTS.md`.
21 changes: 0 additions & 21 deletions .cursor/rules/contentstack-apps.mdc

This file was deleted.

28 changes: 0 additions & 28 deletions .cursor/rules/dev-workflow.md

This file was deleted.

15 changes: 0 additions & 15 deletions .cursor/rules/oclif-commands.mdc

This file was deleted.

15 changes: 0 additions & 15 deletions .cursor/rules/testing.mdc

This file was deleted.

17 changes: 0 additions & 17 deletions .cursor/rules/typescript.mdc

This file was deleted.

5 changes: 1 addition & 4 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
fileignoreconfig:
- filename: .cursor/commands/code-review.md
checksum: ef8ba74b7f9c43203e04200241ab1690a359bc3a3735d158945437840d055d0e
version: "1.0"
version: "1.0"
50 changes: 50 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contentstack Apps CLI – Agent guide

**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.

## What this repo is

| Field | Detail |
|--------|--------|
| **Name:** | [https://github.com/contentstack/contentstack-apps-cli](https://github.com/contentstack/contentstack-apps-cli) |
| **Purpose:** | oclif-based Contentstack CLI **plugin** for Developer Hub app lifecycle: create, read, update, delete apps, install/uninstall, deploy, and related workflows. |
| **Out of scope (if any):** | The core `csdx` CLI binary and global auth UX live outside this repo; this package is the **Apps plugin** only. |

## Tech stack (at a glance)

| Area | Details |
|------|---------|
| **Language** | TypeScript, `target` ES2017, `strict: true`, `noUnusedLocals` / `noUnusedParameters`; `src/` compiles to `lib/`. Node **>= 16** (see `package.json` `engines`). |
| **Build** | `npm run build` — `tsc -b`; `clean` removes `lib/`, `tsconfig.tsbuildinfo`, `oclif.manifest.json`. Key files: `tsconfig.json`, `package.json` `oclif` block. |
| **Tests** | Mocha, `test/**/*.test.ts`; Chai, sinon, nock, `@oclif/test`. `--forbid-only` in CI. |
| **Lint / coverage** | ESLint `.eslintrc` (TypeScript ESLint; `lib/**` and `test/**` ignored). Coverage: `nyc` via `npm run test:unit:report` / `test:unit:report:json`. |
| **Other** | oclif v4; commands under `src/commands/`; shared bases `src/base-command.ts`, `src/app-cli-base-command.ts`. Published API surface is CLI commands, not a library (`src/index.ts` exports `{}`). |

## Commands (quick reference)

| Command Type | Command |
|--------------|---------|
| **Build** | `npm run build` |
| **Test** | `npm test` |
| **Lint** | `npm run lint` |

**Optional:** Unit tests with coverage — `npm run test:unit:report` (JSON report for CI: `npm run test:unit:report:json`). `npm test` runs `posttest` → `npm run lint`.

**CI:** [`.github/workflows/unit-test.yml`](.github/workflows/unit-test.yml) — on pull requests: install deps, run `npm run test:unit:report:json`, publish test and coverage reports.

## Where the documentation lives: skills

| Skill | Path | What it covers |
|-------|------|------------------|
| Development workflow | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Branches/PR expectations, build/test/lint, TDD loop, CI |
| Contentstack Apps domain | [`skills/contentstack-apps/SKILL.md`](skills/contentstack-apps/SKILL.md) | Developer Hub, manifests, GraphQL, HTTP utilities, config, auth in tests |
| Apps CLI framework (oclif) | [`skills/apps-cli-framework/SKILL.md`](skills/apps-cli-framework/SKILL.md) | `BaseCommand`, `AppCLIBaseCommand`, flags, messages, command layout |
| Testing | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Mocha, sinon, nock, `@oclif/test`, fixtures, forbid-only |
| Code review | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR checklist: correctness, tests, security, style |
| TypeScript style | [`skills/typescript-style/SKILL.md`](skills/typescript-style/SKILL.md) | `tsconfig.json`, ESLint, naming and file layout |

The [`skills/`](skills/) directory mirrors this table; see [`skills/README.md`](skills/README.md) for how the folder layout works.

## Using Cursor (optional)

If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **`AGENTS.md`** — same docs as everyone else.
Loading
Loading