From an issue to a proposal
- Choose a documented user need from
data/issues.jsonor a new, cited upstream issue. - Read the current issue state, comments, linked PRs, and successor discussions. Do not assume a closed issue means the need was rejected.
- Pick a category: component improvement, new component, cross-component capability, or alternative implementation.
- Write a problem statement, scope, and acceptance criteria. State what the proposal does not cover.
- Scaffold the files:
npm run experiment:new -- --slug my-experiment --title "My experiment" --type alternative-implementation --components accordion
- Implement the smallest fixture or page that demonstrates the idea. Keep the baseline pane unchanged.
- Add deterministic Playwright tests. Use real key presses and native browser behavior.
- Run the build and evidence collector:
npm run check
npm run test:browser
npm run evidence
npm run build:strict
npm run validate
- Replace the draft language in the experiment documents with what was actually tested. Link the generated reports.
- Add one row to
docs/EXPERIMENT-DECISIONS.mdwhen a human is ready to decide. AI-generated material cannot mark itself approved.
Required files
README.md— why it exists, baseline, proposal, scope, evidence status, limitations.IMPLEMENTATION.md— markup, CSS/JS, accessibility behavior, keyboard, preferences, known gaps.TEST-PLAN.md— deterministic checks, states, browsers, evidence to collect.- A row in
docs/EXPERIMENT-DECISIONS.md— decision, date, reviewer, one-sentence rationale, conditions, and upstream authorization. Do not create a per-experiment decision form.
The registry entry must include the id, title, category, status, summary, components, related issues, scenarios, demo route, document paths, review status, and AI-assistance disclosure.
Evaluation support
An experiment that changes a component should be evaluable, not only viewable.
- Declare the component's evaluation states in
data/registry.json(states) and mark the same ids withdata-stateinscripts/components.mjs. Validation fails when a declared state has no fixture marker. - If a state needs an action to reach it, set
"interaction": "activate"and make the action local-only. Evidence collection and screenshot capture will perform it. - Add component-specific human tests to
data/manual-tests.json. Cite the official USWDS accessibility tests and the WCAG requirement. Never add a result to the definition file. - Add deterministic Playwright coverage for the state, the keyboard path, and any visible state change. Do not treat a Guidepup transcript as real assistive-technology testing.
- Run
npm run evidenceso state-level axe, matched captures, and fixture performance evidence are generated, then inspectcompare.htmlfor the component and state. Review any hard performance budget failure indata/performance-budgets.json; do not raise a ceiling just to make a change pass. - Update the evaluation guide only if the shared model changes; link to it instead of duplicating the instructions.
A component with only an initial state is explicitly marked as not yet modelled. Do not invent states that the fixture cannot reproduce.
Lifecycle
proposed → investigating → prototype → evidence-collected → ready-for-review → changes-requested or accepted → submitted-upstream → adopted-upstream, or deferred / archived.
Do not skip human review. An experiment may end as a rejected proposal or useful documentation; that is a valid outcome.
Rules
- Do not copy implementation code from a GPL project.
- Do not add a dependency without a documented reason and a pinned version.
- Do not weaken a failing assertion to make a build pass.
- Do not label an offline illustration as USWDS evidence.
- Do not open, comment on, or submit anything upstream without explicit maintainer authorization.
- Disclose meaningful AI assistance in the registry and the decision record.