Feat/add copilot instructions and skills#32
Draft
Geoffrey-Dulac wants to merge 6 commits into
Draft
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a structured Copilot guidance system for the repo by introducing scoped instruction documents, reusable “skills” (scaffolding playbooks), and agent prompts under .github/, while removing older frontend docs that overlapped with the new guidance.
Changes:
- Removed legacy
frontend/docs/*guidance docs. - Added multiple Copilot Skills under
.github/skills/*for common scaffolding tasks (stores, services, pages, forms, containers, MUI wrappers, icons). - Added repo-wide and scoped instruction files plus reusable agent prompts under
.github/{copilot-instructions.md,instructions/,prompts/}.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/docs/Styling.md | Removed legacy styling documentation. |
| frontend/docs/ReactStandards.md | Removed legacy React standards documentation. |
| frontend/docs/ComponentsAndContainers.md | Removed legacy component vs container documentation. |
| .github/skills/add-store/SKILL.md | Adds a skill guide for creating Zustand stores using repo conventions. |
| .github/skills/add-store/assets/domainStore.ts.template | Adds a template for scaffolding a new store file. |
| .github/skills/add-service/SKILL.md | Adds a skill guide for creating Axios services and interfaces. |
| .github/skills/add-service/assets/IModel.ts.template | Adds an interface template for service request/response models. |
| .github/skills/add-service/assets/domainService.ts.template | Adds a template for scaffolding a new service file. |
| .github/skills/add-page/SKILL.md | Adds a skill guide for adding a new routed page (public/protected). |
| .github/skills/add-page/assets/withAuthPage.tsx.template | Adds a template for a protected page auth wrapper. |
| .github/skills/add-page/assets/Page.tsx.template | Adds a template for a page component. |
| .github/skills/add-page/assets/page.route.tsx.template | Adds a template for a page route definition. |
| .github/skills/add-mui-component/SKILL.md | Adds a skill guide for wrapping MUI primitives and registering in UiKit. |
| .github/skills/add-mui-component/assets/UikitBlock.snippet.tsx | Adds a snippet template for UiKit registration blocks. |
| .github/skills/add-mui-component/assets/Component.tsx.template | Adds a template for a new MUI wrapper component. |
| .github/skills/add-icon/assets/IconMultiColor.tsx.template | Adds a template for multi-color SVG icon wrappers. |
| .github/skills/add-icon/assets/Icon.tsx.template | Adds a template for monochrome SVG icon wrappers. |
| .github/skills/add-form/SKILL.md | Adds a skill guide for form + Yup schema creation patterns. |
| .github/skills/add-form/assets/FormName.tsx.template | Adds a template for form component scaffolding. |
| .github/skills/add-form/assets/formName.schema.ts.template | Adds a template for Yup schema scaffolding. |
| .github/skills/add-container/SKILL.md | Adds a skill guide for container creation and folder conventions. |
| .github/prompts/review.prompt.md | Adds an agent prompt for repo-convention code reviews. |
| .github/prompts/check-updates.prompt.md | Adds an agent prompt for dependency/toolchain update audits. |
| .github/instructions/typescript.instructions.md | Adds scoped TypeScript conventions and rules. |
| .github/instructions/styling.instructions.md | Adds scoped styling conventions and token/utility guidance. |
| .github/instructions/state-stores.instructions.md | Adds scoped Zustand store conventions and usage rules. |
| .github/instructions/services-api.instructions.md | Adds scoped Axios service conventions and interface rules. |
| .github/instructions/routing-and-auth.instructions.md | Adds scoped routing/auth conventions and page recipe. |
| .github/instructions/react.instructions.md | Adds scoped React component/hook/JSX conventions. |
| .github/instructions/mui-and-uikit.instructions.md | Adds scoped MUI wrapper + UiKit registration conventions. |
| .github/instructions/icons.instructions.md | Adds scoped SVG icon conventions and templates. |
| .github/instructions/i18n.instructions.md | Adds scoped i18n + sheet2i18n workflow conventions. |
| .github/instructions/forms.instructions.md | Adds scoped form + validation conventions and patterns. |
| .github/instructions/components-vs-containers.instructions.md | Adds scoped component vs container decision rules and import allowlist. |
| .github/copilot-instructions.md | Adds repo-wide Copilot orientation and invariant index for contributors/agents. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| --- | ||
|
|
||
| ## The five layers, in priority order |
|
|
||
| When adding style, pick the first tool from this list that fits. Do not skip layers. | ||
|
|
||
| 1. **Utility classes** from [frontend/src/styles/_globals.scss](frontend/src/styles/_globals.scss) and [frontend/src/styles/_export.scss](frontend/src/styles/_export.scss) — one-off spacing, flex, alignment. |
| - [state-stores.instructions.md](state-stores.instructions.md) — the `I<Name>Store` file-local interface convention. | ||
| - [forms.instructions.md](forms.instructions.md) — inline `I<FormName>` props next to the form component. | ||
|
|
||
| The project uses TypeScript in **strict** mode with `noUnusedLocals`, `noUnusedParameters`, and `noFallthroughCasesInSwitch` enabled (see [frontend/tsconfig.app.json](frontend/tsconfig.app.json)). Do not weaken these settings and do not add `// @ts-ignore` or `// @ts-expect-error` unless a comment explains why and links a follow-up. |
Comment on lines
+99
to
+103
| import EPermission from "@enums/EPermission"; | ||
| import withAuth from "@hocs/withAuth"; | ||
| import Dashboard from "@pages/dashbaord/Dashboard"; | ||
|
|
||
| const withAuthDashboard = withAuth(Dashboard, EPermission.DashboardRead); |
Comment on lines
+116
to
+118
| // routes/routes.ts | ||
| import dashboardRoute from "@pages/dashbaord/dashboard.route"; | ||
| import homeRoute from "@pages/home/home.route"; |
| // in a stable constant so `reset<Domain>()` and the initializer share it. | ||
| // const initial__Field__: <Type> = /* ... */; | ||
|
|
||
| export const use__Domain__Store = create<I__Domain__Store>((/* set */) => ({ |
274a385 to
4ae0886
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue or Internal Use Azure Devops Work Item ID:
Proposed Changes
What is the current behavior?
What is the new behavior?
Checklist
Please check that your PR fulfills the following requirements:
Other information