# Microcopy Guidelines

## Objective

Set one standard for how the app writes buttons, hints, confirmations, and errors.

A written standard for the app's short-form text — labels, helper text, confirmations, errors, and recovery instructions — applied to the strings already in the product.

## Before You Begin

This feature is being added to an application that already exists and already
works. Do not scaffold a new project, and do not assume a blank slate.

Inspect the codebase first and establish:

- The existing application structure and where code of this kind already lives.
- The framework and version in use.
- The existing design system — colours, spacing, typography, and component conventions.
- Existing UI components you can reuse instead of writing new ones.
- The existing database structure, if this feature needs to persist anything.
- The existing authentication and authorization system, if this feature is user-scoped.
- Dependencies already installed, so you don't add a library that duplicates one.
- The existing test setup and conventions.

Only start writing code once you understand the above. If the application
already implements part of this feature, extend it rather than replacing it.

## Implementation Instructions

1. Collect the app's existing short strings by type: button labels, field labels and hints, empty states, success confirmations, error messages, and permission refusals. Write the guideline from what is already there, then fix the strings that disagree with it.
2. Require every action label to name its action and object rather than a generic verb. A dialog offering OK and Cancel forces the user to reconstruct what they asked for; one offering Delete invoice and Keep it does not.
3. Make every error say what happened, whether the user's data is safe, and what to do next. An error that only names a failure leaves the user with no move.
4. Write failures as a statement of the situation rather than an accusation. The user did not break anything by leaving a required field empty, and copy that says otherwise gets read as scolding.
5. Do not write copy that only fits in English at desktop width. Allow for text that grows by a third or more when translated, and do not size a button to its current label.

## UI and UX Requirements

Match the application's existing design system exactly. Reuse its components,
spacing, and typography. This feature should look like it was always there.

## Responsive Requirements

Works on mobile, tablet, and desktop. Touch targets are large enough to hit on a
phone, and nothing overflows horizontally at 320px.

## Accessibility Requirements

- Fully keyboard navigable.
- Correct semantic elements and ARIA roles.
- Visible focus states.
- Meets WCAG AA contrast.
- Dynamic changes are announced to screen readers.
- Respects prefers-reduced-motion.

## Edge Cases

- Generic labels — OK, Submit, Yes, Continue — are ambiguous in a dialog and meaningless when read out of context by a screen reader. Every label must work when read alone.
- The same concept must use the same word in every string. If the interface calls it a workspace in navigation and a team in an error, the user assumes they are two different things.
- Blame language turns a recoverable state into a reprimand. Say what is required, not what the user failed to do.
- Translated strings routinely expand well beyond the English length, so layouts must tolerate longer labels without truncating a button or wrapping a single word onto its own line.
- Text that will be interpolated must not be assembled from sentence fragments; a sentence split across variables cannot be translated or pluralised correctly.
- Copy must not name internal services, error codes, or ticket references in a message meant for a customer, though a reference identifier for support is fine when it is labelled as one.
- Which word the app uses for each concept is owned by Terminology Dictionary; this guideline governs the shape of the sentence around those words.

## Testing

Exercise the feature end to end in the running application. Cover every edge case
above, then run the existing test suite and confirm nothing regressed.

## Acceptance Criteria

- [ ] Every action label names its verb and its object, and reads correctly in isolation.
- [ ] Error messages state the cause, the state of the user's data, and the next step.
- [ ] No user-facing string assigns fault to the user.
- [ ] Layouts hold without truncation when strings grow by a third.
- [ ] Interpolated messages are complete sentences with variables, not concatenated fragments.
- [ ] Product terms in copy match the Terminology Dictionary exactly.
- [ ] The feature matches the existing design system.
- [ ] No existing functionality is broken.

## Adaptation Rules

- Match the existing design system. Do not introduce a new colour palette,
  spacing scale, or component library.
- Reuse existing components and utilities wherever they fit.
- Follow the naming, file layout, and code style already present.
- Do not upgrade, replace, or remove existing dependencies to make this
  feature fit. Adapt the feature to the app, not the app to the feature.
- Do not break existing functionality. If a change is genuinely required in
  existing code, make the smallest one that works and say so.
- If something in these instructions conflicts with how the application is
  built, follow the application and explain the deviation.

## Final Verification

Before you report the work as done:

1. Re-read the acceptance criteria above and check each one against what you
   actually built.
2. Run the application and exercise the feature end to end.
3. Run the existing test suite and confirm you have broken nothing.
4. Check the feature on mobile, tablet, and desktop widths.
5. Check keyboard navigation and focus handling.
6. Summarize what changed: files added, files modified, and anything you
   deliberately did differently because of how this application is built.

If any acceptance criterion is unmet, fix it before reporting completion.
