opal-frontend-repo-guidelines
Repository structure, build/test commands, coding style, and contribution rules for opal-frontend. Use when navigating the repo, running or debugging builds/lint/tests, following style conventions, or setting up local tooling.
$ Installer
git clone https://github.com/hmcts/opal-frontend /tmp/opal-frontend && cp -r /tmp/opal-frontend/skills/opal-frontend/opal-frontend-repo-guidelines ~/.claude/skills/opal-frontend// tip: Run this command in your terminal to install the skill
SKILL.md
name: opal-frontend-repo-guidelines description: Repository structure, build/test commands, coding style, and contribution rules for opal-frontend. Use when navigating the repo, running or debugging builds/lint/tests, following style conventions, or setting up local tooling.
Opal Frontend Repo Guidelines
Overview
Use these rules to keep work aligned with opal-frontend structure, tooling, and contribution expectations.
ExecPlans
- When asked to create or update an ExecPlan, read
references/plans.mdin this skill and follow it exactly.
Project Structure
- Keep Angular feature modules, shared services, and unit specs in
src/app; colocate UI state with feature directories. - Use
src/assetsandsrc/styles.scssfor static assets and global styling; add new bundled assets toangular.json. - Keep deployment and infra logic under
infrastructure/andcharts/; keep SSR helpers inserver.tsandserver-setup.ts.
Build, Test, and Development Commands
- Run
yarn startforng serveathttp://localhost:4200/with live reload. - Run
yarn ng lintfor Angular ESLint acrosssrc/**/*.tsandsrc/**/*.html. - Run
yarn buildfor a production bundle indist/. - Run
yarn testfor Karma/Jasmine once; useyarn test:coveragefor lcov incoverage/. - Run
yarn test:a11yfor accessibility checks.
Coding Style and Naming
- Follow
.editorconfig: UTF-8, spaces, 2-space indent, trimmed trailing whitespace, single quotes in.ts. - Follow
.prettierrc: 120 character width, single quotes, and semicolons; runnpx prettier --writeon touched files if formatting drifts. - Use Angular selectors with the
appprefix (app-example) and order TypeScript members by visibility; keep directive selectors camelCase.
Testing Basics
- Name Jasmine specs as
*.spec.tsalongside sources. - Prefer shallow
TestBedsetups and mock HTTP/Store dependencies. - Keep major features above 80% branch coverage before merging.
Commit and Pull Request Guidelines
- Follow Conventional Commits, optionally prefixed with Jira keys (e.g.,
PO-716); keep subjects at or below 72 characters. - Reference the Jira ticket and linked PR (e.g.,
(#1828)) in subject or body. - Include a concise summary, testing evidence, and updated checklists in PRs; attach Cypress artifacts when debugging flakes.
Local Environment and Tooling
- Use Node
22.20.0from.nvmrcand Yarn4.10.3; runcorepack enablebeforeyarn install. - Copy baseline env configs from
config/; prefer.env.localand avoid committing secrets. - Review
sonar-project.propertiesbefore pipeline builds.
Repository

hmcts
Author
hmcts/opal-frontend/skills/opal-frontend/opal-frontend-repo-guidelines
8
Stars
1
Forks
Updated4d ago
Added1w ago