Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Commit 7e66101

Browse files
committed
updated the cursor rules structure
1 parent 1b4a1c2 commit 7e66101

16 files changed

Lines changed: 231 additions & 374 deletions

File tree

.cursor/rules/README.md

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
# Cursor rules
1+
# Cursor (optional)
22

3-
Context-aware guidance for developing `@contentstack/cli-cm-regex-validate` (Contentstack CLI oclif plugin).
3+
**Cursor** users: start at **[`AGENTS.md`](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**.
44

5-
## Rules overview
5+
This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs.
66

7-
| File | Scope |
8-
|------|--------|
9-
| `dev-workflow.md` | Core workflow, validation commands, links to skills (always applied) |
10-
| `typescript.mdc` | TypeScript and ESLint conventions |
11-
| `testing.mdc` | Jest + ts-jest tests |
12-
| `oclif-commands.mdc` | Command classes under `src/commands/` |
13-
| `contentstack-cli.mdc` | Utilities under `src/utils/` (SDK, safe-regex, output) |
14-
15-
## How rules apply
16-
17-
- `dev-workflow.md` uses `alwaysApply: true` and broad globs so it loads for most edits.
18-
- `.mdc` rules load when you work in matching paths (see each file’s `globs`).
19-
20-
## Manual references in chat
21-
22-
You can mention rules by context, for example: TypeScript guidance when editing `src/**/*.ts`, testing patterns when editing `**/*.test.ts`.
7+
Path from this file to the repo root agent guide: **`../../AGENTS.md`** (two levels up from `.cursor/rules/`).

.cursor/rules/contentstack-cli.mdc

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

.cursor/rules/dev-workflow.md

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

.cursor/rules/oclif-commands.mdc

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

.cursor/rules/testing.mdc

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

.cursor/rules/typescript.mdc

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

.cursor/skills/SKILL.md

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

.talismanrc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
fileignoreconfig:
2-
- filename: package-lock.json
3-
checksum: 3f663322d950acc49b7e8899ca353456b1e7ac6277ac36fdfcac813644fb07d7
4-
- filename: .cursor/rules/dev-workflow.md
5-
checksum: 9912be426cb15077a67b81bd5801f2a65d367e30204d278c6814ebb1d74661ba
2+
- filename: skills/dev-workflow/SKILL.md
3+
checksum: bbe23955b8865b7b44e8adaf414dce2b0127921ed1e35488adf470fdd833270f
64
- filename: skills/code-review/references/code-review-checklist.md
7-
checksum: 8bc8e53a9775258ddfadb40f9a6f415508d87aa9c70c95ebf748737e1ef7dbee
8-
- filename: skills/contentstack-cli/references/contentstack-patterns.md
9-
checksum: 3e3f445d01c67577dc91b1ba6ee27dcd1ffc1e907b2fbf33ce9b2905eaba239a
5+
checksum: 7b5132bc27e2328f32ecf38941bb117a77be0d83502f15c3a5d1933f3220b6fc
6+
- filename: package-lock.json
7+
checksum: 31cf2fecced45ffd2db8b1f7c5258d1c98c2d0be7dd443460cfc070558a85c82
108
version: ""

AGENTS.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,46 @@
1-
# cli-cm-regex-validate
1+
# cli-cm-regex-validate – Agent guide
22

3-
`@contentstack/cli-cm-regex-validate` is a **Contentstack CLI** oclif plugin with a single command, **`csdx cm:stacks:validate-regex`**, which scans content types and/or global fields in a stack for regex `format` values that fail the `safe-regex` check, then writes results to CSV and prints a summary table. User-facing copy lives in `messages/index.json`.
3+
**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**.
44

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

7-
| Area | Path |
8-
|------|------|
9-
| Command | `src/commands/cm/stacks/validate-regex.ts` |
10-
| Utils | `src/utils/` (`connect-stack`, `process-stack`, `safe-regex`, `generate-output`, `interactive`) |
11-
| Messages | `messages/index.json` |
12-
| Tests | `test/utils/*.test.ts` |
13-
| Fixtures | `test/data/*.json` |
7+
| Field | Detail |
8+
|-------|--------|
9+
| **Name:** | [contentstack/cli-cm-regex-validate](https://github.com/contentstack/cli-cm-regex-validate) (`@contentstack/cli-cm-regex-validate` on npm) |
10+
| **Purpose:** | Contentstack CLI oclif plugin with a single command, **`csdx cm:stacks:validate-regex`**, which scans content types and/or global fields in a stack for regex `format` values that fail the `safe-regex` check, then writes results to CSV and prints a summary table. User-facing copy lives in `messages/index.json`. |
11+
| **Out of scope (if any):** | Not a general-purpose Contentstack SDK — only this plugin’s command, utils, and tests. |
1412

15-
## Workflow
13+
## Tech stack (at a glance)
1614

17-
- Run **`npm test`** (Jest + ts-jest) before pushing; CI uses the same in `.github/workflows/unit-tests.yml`.
18-
- Run ESLint after tests via **`npm run posttest`** (or your team’s eslint invocation from `package.json`).
15+
| Area | Details |
16+
|------|---------|
17+
| Language | TypeScript (`strict`), Node `>=14.0.0` per `package.json` engines |
18+
| Build | npm; `prepack` runs `tsc -b`, oclif manifest, oclif readme — see `package.json` |
19+
| Tests | Jest + ts-jest (`jest.config.ts`), `npm test`; suites under `test/utils/`, fixtures `test/data/*.json` |
20+
| Lint / coverage | ESLint (`.eslintrc`), `npm run posttest` |
21+
| Other | oclif v3, `@contentstack/cli-command`; CI: Node 22.x — [`.github/workflows/unit-tests.yml`](.github/workflows/unit-tests.yml). **CI runs Jest only** (`npm run test`); **ESLint is not run in CI** — run `npm run posttest` locally before merge. |
1922

20-
## Naming
23+
## Commands (quick reference)
2124

22-
- Source files: kebab-case.
23-
- Tests: describe behavior clearly (what should happen under which condition).
25+
| Command type | Command |
26+
|--------------|---------|
27+
| Build (release prep) | `npm run prepack` — cleans `lib`, compiles, generates oclif manifest and readme |
28+
| Test | `npm test` |
29+
| Lint | `npm run posttest` |
2430

25-
## Universal skills (any agent)
31+
CI runs `npm i` and `npm run test` on pull requests — see [`.github/workflows/unit-tests.yml`](.github/workflows/unit-tests.yml). It does **not** run `npm run posttest` (ESLint); run lint locally before merging.
2632

27-
- `@skills/testing` — Jest mocks, fixtures, no live API calls
28-
- `@skills/contentstack-cli` — SDK flow, schema recursion, `safe-regex`, output
29-
- `@skills/code-review` — PR checklist (security, packaging, CI, messages)
33+
## Where the documentation lives: skills
3034

31-
## Cursor rules (IDE)
35+
| Skill | Path | What it covers |
36+
|-------|------|----------------|
37+
| Development workflow | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Commands, repo layout, naming, hooks, TDD, before merge |
38+
| Testing | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest, mocks, fixtures, no live API calls |
39+
| Contentstack CLI | [`skills/contentstack-cli/SKILL.md`](skills/contentstack-cli/SKILL.md) | Command flow, SDK, schema walk, `safe-regex`, CSV/table output |
40+
| Code review | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR and release checklist |
3241

33-
For file-scoped guidance, Cursor loads rules under `.cursor/rules/`. You can reference them in chat by intent, for example:
42+
An index with “when to use” hints is in [`skills/README.md`](skills/README.md).
3443

35-
- TypeScript and ESLint conventions — `typescript.mdc`
36-
- Jest tests — `testing.mdc`
37-
- Command class — `oclif-commands.mdc`
38-
- Utils (SDK, safe-regex, output) — `contentstack-cli.mdc`
39-
- Dev workflow — `dev-workflow.md` (always applied)
44+
## Using Cursor (optional)
4045

41-
See `.cursor/rules/README.md` for the full index.
46+
If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **[`AGENTS.md`](AGENTS.md)** — same docs as everyone else.

0 commit comments

Comments
 (0)