-
Notifications
You must be signed in to change notification settings - Fork 43
Add maintainer guidance #1380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add maintainer guidance #1380
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,132 @@ | ||||||||
| # Maintainers Guide | ||||||||
|
|
||||||||
| This document is for people with maintainer permissions on | ||||||||
| XGovFormBuilder/digital-form-builder. | ||||||||
|
|
||||||||
| Maintainers are responsible for: | ||||||||
|
|
||||||||
| - Protecting the long-term vision of the project | ||||||||
| - Keeping the designer and runner aligned | ||||||||
| - Enforcing quality: tests, style, accessibility, docs | ||||||||
| - Being good stewards of the community (see CODE_OF_CONDUCT.md) | ||||||||
|
|
||||||||
| If you’re not a maintainer, see CONTRIBUTING.md instead. | ||||||||
|
Comment on lines
+11
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor - could we make these links to reduce friction please? (if you're reading on GitHub/preview for example) |
||||||||
|
|
||||||||
| ## Vision and scope | ||||||||
|
|
||||||||
| **Vision** | ||||||||
|
|
||||||||
| XGov Digital Form Builder exists to let anyone quickly design and deploy | ||||||||
| high-quality, GOV.UK-style forms. | ||||||||
|
|
||||||||
| We do this via two main pieces: | ||||||||
|
|
||||||||
| - **Designer** – a UI for building forms through a simple, low-code interface | ||||||||
| - **Runner** – an app that serves and runs those forms for end users | ||||||||
|
|
||||||||
| **As a maintainer, you agree to:** | ||||||||
|
|
||||||||
| 1. **Keep designer and runner in sync** | ||||||||
|
|
||||||||
| - Any change to the form model, components or behaviour that affects one | ||||||||
| SHOULD be reflected in the other. | ||||||||
| - Prefer changes that improve both designer and runner rather than | ||||||||
| introducing “designer-only” or “runner-only” concepts. | ||||||||
| - If you must diverge temporarily, open an issue to track re-alignment and | ||||||||
| reference it in the PR. | ||||||||
|
|
||||||||
| 2. **Stay within scope** | ||||||||
|
|
||||||||
| - We focus on **GOV.UK-style** digital forms and journeys. | ||||||||
| - Avoid adding features that: | ||||||||
| - conflict with GOV.UK Design System and Service Standard, or | ||||||||
| - turn the project into a generic “do everything” app builder. | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to add examples of "do everything"? or describe the architecture / how XGovFormBuilder should fit into architectures? |
||||||||
| - When in doubt about scope, open a discussion/ADR rather than merging. | ||||||||
|
|
||||||||
| ## Quality expectations | ||||||||
|
|
||||||||
| Maintainers are the last line of defence for quality. Before you merge, you | ||||||||
| are responsible for ensuring: | ||||||||
|
|
||||||||
| ### Tests | ||||||||
|
|
||||||||
| - New features come with appropriate **unit tests** and, where relevant, | ||||||||
| **integration/e2e tests**. | ||||||||
| - CI must be green. Do not merge on red or “flaky but probably fine” runs. | ||||||||
| - When fixing a bug, add at least one test that fails before the fix | ||||||||
| and passes after. | ||||||||
|
|
||||||||
| ### Style & consistency | ||||||||
|
|
||||||||
| - Code must follow the project’s eslint/prettier/tsconfig setup. | ||||||||
| - Prefer existing patterns over new ones: | ||||||||
| - Use established component and model patterns before inventing new abstractions. | ||||||||
| - Keep naming consistent with existing code (e.g. same terminology in designer, | ||||||||
| runner and docs). | ||||||||
|
|
||||||||
| ### Accessibility & UX | ||||||||
|
|
||||||||
| - Changes to UI must consider accessibility: | ||||||||
| - Use GOV.UK Design System components and patterns wherever possible. | ||||||||
| - Ensure labels, error messages and focus states are correct. | ||||||||
| - Try the change in both **designer** and **runner** and sanity-check the | ||||||||
| user journey. | ||||||||
|
|
||||||||
| ### Documentation | ||||||||
|
|
||||||||
| - Significant behaviour or model changes must be documented: | ||||||||
| - Update relevant README/feature docs/ADRs. | ||||||||
| - Note breaking changes clearly in the changelog / release notes | ||||||||
| (see versioning rules). | ||||||||
|
|
||||||||
| ## Maintainer workflow | ||||||||
|
|
||||||||
| ### Branching and merging | ||||||||
|
|
||||||||
| - Use pull requests for all changes (no direct commits to `main`). | ||||||||
| - Use the existing commit prefixes for SemVer: | ||||||||
| - `breaking:` / `major:` | ||||||||
| - `feature:` / `minor:` | ||||||||
| - `fix:` / `patch:` | ||||||||
| - Never bypass review on your own non-trivial PRs: | ||||||||
| - At least **one other maintainer** should approve, unless: | ||||||||
| - change is trivial (docs/typo) AND | ||||||||
| - no behaviour or API changes. | ||||||||
|
|
||||||||
| ### Reviews | ||||||||
|
|
||||||||
| When reviewing PRs, maintainers should: | ||||||||
|
|
||||||||
| 1. **Check alignment with vision** | ||||||||
|
|
||||||||
| - Does this help people build GOV.UK-style forms more easily? | ||||||||
| - Does it keep designer and runner aligned? | ||||||||
|
|
||||||||
| 2. **Check quality** | ||||||||
|
|
||||||||
| - Tests added/updated? | ||||||||
| - CI green? | ||||||||
| - Code follows existing patterns? | ||||||||
|
|
||||||||
| 3. **Be constructive** | ||||||||
| - Prefer "how can we get this over the line?" to "no". | ||||||||
| - Suggest concrete changes when requesting changes. | ||||||||
|
|
||||||||
| ### Security & compliance | ||||||||
|
|
||||||||
| - Treat secrets, keys and environment variables with care. | ||||||||
| - Do not commit secrets. If a leak happens, rotate and document the incident. | ||||||||
| - Follow GOV.UK and general security best practices (input validation, output | ||||||||
| encoding, etc.). | ||||||||
|
|
||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is the right place to put this? or we the above section?
Suggested change
|
||||||||
| ## Architecture decisions | ||||||||
|
|
||||||||
| - Non-trivial changes to architecture, data model or external interfaces | ||||||||
| (e.g. how forms are stored/run) SHOULD have an Architecture Decision Record (ADR). | ||||||||
| - ADRs should: | ||||||||
| - explain the problem, | ||||||||
| - list options considered, | ||||||||
| - record the decision and rationale. | ||||||||
|
|
||||||||
| Maintainers are responsible for keeping ADRs up to date when behaviour diverges | ||||||||
| from what’s written. | ||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth adding a section around community considerations? Or adding it to an existing section?
tbh - every change has been aggressively backwards compatible so far. There has been no breaking change iirc. Pretty much the only team/dep that has leeway is if they are the first to implement on this project and their service (i.e. no risk of breaking someone else's implementation).
We can start using semver/breaking change aggressively but poses a lot of risk. Not all members are in the slack community either so harder for them to discuss/stand their ground.
Another thing, not sure if we want this to be a maintainers' responsibility, but generally when there is a CI issue (GitHub actions change, version change breaking build etc which is not related to the PR) I have been resolving and merging that first.