|
| 1 | +# Agent guide — Contentstack Migrate plugin |
| 2 | + |
| 3 | +Use this file when automating work in `cli-plugin-migrate/`. |
| 4 | + |
| 5 | +## What this repo is |
| 6 | + |
| 7 | +- **Package:** `@contentstack/cli-plugin-migrate` |
| 8 | +- **Commands:** `csdx migrate:export|convert|audit|import|status` |
| 9 | +- **Scope:** Contentful → Contentstack migration (expert CLI, no bundled AI) |
| 10 | + |
| 11 | +## User-facing docs (read first) |
| 12 | + |
| 13 | +| Doc | Use when | |
| 14 | +|-----|----------| |
| 15 | +| [README.md](./README.md) | Install, commands, troubleshooting | |
| 16 | +| [docs/getting-started.md](./docs/getting-started.md) | Onboarding colleagues | |
| 17 | +| [docs/expert-workflow.md](./docs/expert-workflow.md) | End-to-end pipeline | |
| 18 | +| [docs/limitations-and-scope.md](./docs/limitations-and-scope.md) | What is / isn't supported | |
| 19 | + |
| 20 | +## Maintainer docs |
| 21 | + |
| 22 | +| Doc | Use when | |
| 23 | +|-----|----------| |
| 24 | +| [docs/architecture.md](./docs/architecture.md) | Package layout, adapters | |
| 25 | +| [docs/implementation-principles.md](./docs/implementation-principles.md) | Port vs PRD flags, spawn rules | |
| 26 | +| [docs/phases/](./docs/phases/) | Per-command implementation specs | |
| 27 | + |
| 28 | +## Rules for changes |
| 29 | + |
| 30 | +1. **Do not** add `--stack` to `migrate:convert` — import stays on `migrate:import`. |
| 31 | +2. **Audit/import** → shell out via `src/lib/csdx-spawn.ts`, do not reimplement CMA. |
| 32 | +3. **Export** → `src/lib/contentful-cli-spawn.ts` (global `contentful` or `npx -y contentful-cli`). |
| 33 | +4. **Never log** management tokens or full stack API keys. |
| 34 | +5. **Manifest** updates on successful command completion — see `src/lib/manifest.ts`. |
| 35 | +6. Match flag names in [README.md](./README.md) and phase docs, not the old reference Commander CLI. |
| 36 | + |
| 37 | +## Verify |
| 38 | + |
| 39 | +```bash |
| 40 | +npm run build && npm test |
| 41 | +``` |
| 42 | + |
| 43 | +Reference port source (optional, parent monorepo): `../references/import-contentful-cli-main/`. |
0 commit comments