From: Jérôme Benoit Date: Sun, 19 Apr 2026 16:19:25 +0000 (+0200) Subject: docs: add monorepo structure to copilot instructions, clarify command scopes X-Git-Tag: v4.5~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d7ef32996398570fd53ecd8850d25d4ad43995ff;p=e-mobility-charging-stations-simulator.git docs: add monorepo structure to copilot instructions, clarify command scopes - Add monorepo structure section to copilot-instructions.md - Simplify quality gates to reference sub-project READMEs (no duplication) - Clarify opencode format/test commands scope to root simulator only - Add pnpm build to ui/common README scripts table - Fix duplicate bullet points and table alignment --- diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 67503c74..e338c12d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -31,6 +31,12 @@ These instructions guide GitHub Copilot to generate changes consistent with this - **When documenting**: - Follow documentation conventions below. +## Monorepo structure + +4 TypeScript packages (pnpm workspace: `/`, `/ui/common`, `/ui/cli`, `/ui/web`) + 1 Python project (`/tests/ocpp-server`). Each has its own quality gates — see sub-project READMEs. + +UI Common (`ui-common`) is the shared library for CLI and Web UI. No re-exports between packages. + ## Core principles - **Design patterns**: prefer established patterns (e.g., factory, singleton, strategy) for code organization and extensibility. @@ -101,9 +107,8 @@ Documentation serves as an operational specification, not narrative prose. ## Quality gates -- Documented build/type checks/lint pass (where applicable). -- Documented tests pass (where applicable). -- Documentation updated to reflect changes when necessary. +Each sub-project has its own quality gates (format, typecheck, lint, build, test). See sub-project READMEs for exact commands. Run gates for every sub-project affected by your changes. + - Logs use appropriate levels (error, warn, info, debug). - Pull request title and commit messages follow [Conventional Commits](https://www.conventionalcommits.org/) format. diff --git a/.opencode/command/format-simulator.md b/.opencode/command/format-simulator.md index c678cf96..b57eb631 100644 --- a/.opencode/command/format-simulator.md +++ b/.opencode/command/format-simulator.md @@ -2,7 +2,7 @@ description: Run simulator code linter and formatter. --- -Run simulator code formatter and linter with autofixes. +Run root simulator code formatter and linter with autofixes (root only, not ui/\* sub-projects). Raw output: !`pnpm format` Summarize code formatter or linter failures and propose targeted fixes. diff --git a/.opencode/command/test-simulator.md b/.opencode/command/test-simulator.md index 60a15fde..c680d17c 100644 --- a/.opencode/command/test-simulator.md +++ b/.opencode/command/test-simulator.md @@ -2,7 +2,7 @@ description: Run simulator test suite --- -Run simulator test suite. +Run root simulator test suite (root only, not ui/\* sub-projects). Raw output: !`pnpm test` Summarize failing tests and propose targeted fixes. diff --git a/ui/common/README.md b/ui/common/README.md index 4594a957..5194e650 100644 --- a/ui/common/README.md +++ b/ui/common/README.md @@ -74,10 +74,11 @@ const valid = validateUUID(id) // boolean ## Available Scripts -| Script | Description | -| -------------------- | -------------------------------- | -| `pnpm typecheck` | Type-check | -| `pnpm lint` | Run ESLint | -| `pnpm format` | Run Prettier and ESLint auto-fix | -| `pnpm test` | Run unit tests | -| `pnpm test:coverage` | Run unit tests with coverage | +| Script | Description | +| -------------------- | ----------------------------------------- | +| `pnpm build` | Type-check (same as typecheck, no output) | +| `pnpm typecheck` | Type-check | +| `pnpm lint` | Run ESLint | +| `pnpm format` | Run Prettier and ESLint auto-fix | +| `pnpm test` | Run unit tests | +| `pnpm test:coverage` | Run unit tests with coverage |