{"owner":"jhipster","repo":"generator-jhipster","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","CLAUDE.md",".github/copilot-instructions.md"],"files":{"AGENTS.md":"# AI agent instructions for generator-jhipster\n\nJHipster is a Yeoman-based code generator (TypeScript, ESM, Node — see `engines` in `package.json` for the required version) that scaffolds Spring Boot + Angular/React/Vue applications. See `ARCHITECTURE.md`, `BLUEPRINTS.md`, and `DEVELOPMENT.md` for background context.\n\n**Trust order when docs disagree:** `package.json` scripts and the current source tree are the source of truth. Prose docs (including `DEVELOPMENT.md`) may be stale — verify commands against `package.json` before running them.\n\n## Build, lint, test\n\n- Install: `npm ci` (also compiles via `prepare` → `build`).\n- Build: `npm run build` (runs `clean` → `tsc` → copy non-TS template files + `.d.ts` to `dist/`, then `bin/fix-bin.cjs`). Use `npm run compile` alone for a faster TS-only recompile.\n- Type-check tests: `npm run check-types` (`tsc -p tsconfig.spec.json`).\n- Lint: `npm run lint` (eslint, `--max-warnings 5`). Auto-fix: `npm run lint-fix` (runs eslint `--fix` then `prettier --write`).\n- Prettier check/format: `npm run prettier:check` / `npm run prettier:format`.\n- Full test (lint + type-check + mocha): `npm test`. Runs esmocha over `test generators cli .blueprint lib` with `--forbid-only`.\n- Fast test (skip lint/type-check): `npx esmocha`.\n- Single test file / directory: `npx esmocha <path>` (add `--no-parallel` for clearer stack traces).\n- Update snapshots: `npm run update-snapshot -- <path>` (single) or `npm run update-snapshots` (all). Equivalent: `npx esmocha <path> --no-parallel --update-snapshot`.\n- JDL-only tests: `npm run jdl:test` (watch: `npm run jdl:test-watch`).\n\nSnapshots live next to specs as `*.snap` and are committed. Never hand-edit them — regenerate.\n\n**Always run `npm run prettier:format` (or `npm run lint-fix`) before committing** so changes match the project's Prettier configuration. CI will fail otherwise.\n\n## Running the generator locally\n\nTwo options (see `DEVELOPMENT.md`):\n\n- JIT: `alias jhipster=\"$PWD/bin/jhipster.cjs\"` — no build step needed.\n- Linked build: `npm run build && npm link`; rebuild after changes.\n  On generated apps use `jhipster --skip-jhipster-dependencies` plus `npm link generator-jhipster` so the dev version is picked up. `jhipster --install-path` shows which copy is active.\n\n## Big-picture architecture\n\n- CLI entry: `cli/jhipster.cjs` → `cli/cli.ts` (env checks) → `cli/program.ts` (commander parsing, generator/blueprint lookup) → spawns a Yeoman Environment which runs the selected generator.\n- Generator hierarchy (extend the lowest level that has what you need):\n  `GeneratorBaseCore` → `GeneratorBase` (blueprint composition) → `GeneratorApplication` (entity APIs).\n- Each generator lives in `generators/<name>/` with a fixed layout:\n  - `index.ts` — re-exports the generator as **default** plus the `command`. Required for the exports map in `package.json`.\n  - `generator.ts` — priority task groups (see below).\n  - `command.ts` — CLI args/options/configs (consumed by `parseJHipsterArguments` / `parseJHipsterConfigs` and by `program.ts` to build the CLI).\n  - `templates/` — EJS templates rendered during `writing`/`writingEntities`.\n  - `support/` — exported helpers (part of the public API via `./generators/*/support`).\n  - `internal/` — non-exported helpers.\n  - `resources/`, `jdl/` — supporting data / JDL specs.\n    Sub-generators nest under `generators/<parent>/generators/<child>/` and are exported via the same pattern.\n- Priority lifecycle (order matters, see `ARCHITECTURE.md` for full list): `initializing` → `prompting` → `configuring` → `composing` → `loading` → `preparing` → `configuringEachEntity` → `loadingEntities` → `preparingEachEntity` → `preparingEachEntityField` → `preparingEachEntityRelationship` → `default` → `writing` → `writingEntities` → `postWriting` → `install` → `end`. Use the matching `as<Priority>TaskGroup()` helper on the generator to get typed task signatures.\n- Blueprints (`BLUEPRINTS.md`): three flavors — replacement, side-by-side, standalone. `GeneratorBase` handles composition; blueprinted sub-generators are discovered and composed in `beforeQueue`.\n- `lib/` holds shared, **exported** code: `lib/jdl` (Chevrotain-based JDL parser), `lib/testing` (test harness, also importable as `#testing`), `lib/utils`, `lib/eslint`, `lib/ci`. Keep cross-generator logic here, not inside an individual generator.\n- `.blueprint/` is the in-repo \"dev blueprint\" enabled when running via JIT. It provides sub-generators like `generate-sample`, `generate-generator`, `from-issue`, `update-spring-boot`, etc. — use these instead of ad-hoc scripts when generating samples for manual testing.\n- Build output in `dist/` is what gets published. The `exports` map in `package.json` defines the public API surface — don't import across generator `internal/` boundaries.\n- **Never edit `dist/` directly.** Modify source in `cli/`, `generators/`, `lib/`, etc., then rebuild with `npm run build` (or `npm run compile` for TS-only).\n\n## Key conventions\n\n- **ESM + TypeScript everywhere**; `\"type\": \"module\"` in `package.json`. Use `.ts`/`.mts`. Tests are `*.spec.ts` run by `esmocha`.\n- **Task groups**: define priorities as getters returning the result of `this.as<Priority>TaskGroup({...})`. Never call tasks directly — the Yeoman environment orchestrates them.\n- **Config access**: prefer `this.jhipsterConfig` (persists to `.yo-rc.json`), `this.jhipsterConfigWithDefaults` (read-only with defaults applied), and the `application`/`entity`/`field`/`relationship` context objects injected into tasks. Derived booleans (e.g. `entity.dtoMapstruct`, `field.fieldTypeInteger`) belong in `preparing*` priorities, not in templates.\n- **Writing files**: use `this.writeFiles({ blocks, context })` with `condition` functions on blocks rather than branching inside templates. Use `editFile(path, transform)` or the needle APIs on `source` in `postWriting` to inject into already-written files.\n- **Templates**: EJS (`.ejs`). Two-space indent for template logic; generated file's own rules apply to content. Factor shared fragments into `.ejs` sub-templates included via `<%- include('../path', { ... }) -%>`.\n- **Commit messages** (enforced at review): imperative present tense, lowercase first letter, no trailing dot, header ≤100 chars. Reference issues in footer (`Fix #1234`). Use `[ci skip]` for docs-only commits.\n- **Tests required** for every feature or bug fix. When behavior touches generated output, update/extend snapshots rather than asserting strings by hand.\n- **Path aliases** for tests: `#testing` → `lib/testing/index.ts`, `#test-support` → `test/support/index.ts`.\n- **Node version**: CI and local must match `engines` in `package.json`; avoid APIs only in newer releases.\n","CLAUDE.md":"See [`AGENTS.md`](./AGENTS.md) at the repository root for the canonical AI agent instructions for this codebase.\n",".github/copilot-instructions.md":"See [`AGENTS.md`](../AGENTS.md) at the repository root for the canonical AI agent instructions for this codebase.\n"}}